@escapeaihq/client-core 0.49.1 → 0.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +445 -153
- package/dist/adapters/capabilities.d.ts +20 -3
- package/dist/adapters/capabilities.d.ts.map +1 -1
- package/dist/adapters/directorAdapter.d.ts +5 -4
- package/dist/adapters/directorAdapter.d.ts.map +1 -1
- package/dist/adapters/directorAdapter.js +5 -4
- package/dist/adapters/directorAdapter.js.map +1 -1
- package/dist/adapters/experienceModelCatalog.d.ts +382 -0
- package/dist/adapters/experienceModelCatalog.d.ts.map +1 -0
- package/dist/adapters/experienceModelCatalog.js +401 -0
- package/dist/adapters/experienceModelCatalog.js.map +1 -0
- package/dist/adapters/extractionAdapter.d.ts +81 -0
- package/dist/adapters/extractionAdapter.d.ts.map +1 -0
- package/dist/adapters/extractionAdapter.js +98 -0
- package/dist/adapters/extractionAdapter.js.map +1 -0
- package/dist/adapters/imageAdapter.d.ts +5 -1
- package/dist/adapters/imageAdapter.d.ts.map +1 -1
- package/dist/adapters/imageAdapter.js +5 -1
- package/dist/adapters/imageAdapter.js.map +1 -1
- package/dist/adapters/index.d.ts +54 -16
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +62 -11
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/momentDirective.d.ts +66 -0
- package/dist/adapters/momentDirective.d.ts.map +1 -0
- package/dist/adapters/momentDirective.js +78 -0
- package/dist/adapters/momentDirective.js.map +1 -0
- package/dist/adapters/momentPolicy.d.ts +132 -0
- package/dist/adapters/momentPolicy.d.ts.map +1 -0
- package/dist/adapters/momentPolicy.js +165 -0
- package/dist/adapters/momentPolicy.js.map +1 -0
- package/dist/adapters/registry.d.ts +1 -1
- package/dist/adapters/registry.d.ts.map +1 -1
- package/dist/adapters/videoGenAdapter.d.ts +55 -0
- package/dist/adapters/videoGenAdapter.d.ts.map +1 -0
- package/dist/adapters/videoGenAdapter.js +78 -0
- package/dist/adapters/videoGenAdapter.js.map +1 -0
- package/dist/adapters/worldAdapter.d.ts +132 -11
- package/dist/adapters/worldAdapter.d.ts.map +1 -1
- package/dist/adapters/worldAdapter.js +127 -11
- package/dist/adapters/worldAdapter.js.map +1 -1
- package/dist/adapters/worldModelPreference.d.ts +173 -0
- package/dist/adapters/worldModelPreference.d.ts.map +1 -0
- package/dist/adapters/worldModelPreference.js +209 -0
- package/dist/adapters/worldModelPreference.js.map +1 -0
- package/dist/adapters/worldModelTradeoffs.d.ts +120 -0
- package/dist/adapters/worldModelTradeoffs.d.ts.map +1 -0
- package/dist/adapters/worldModelTradeoffs.js +154 -0
- package/dist/adapters/worldModelTradeoffs.js.map +1 -0
- package/dist/admin.d.ts +545 -0
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +230 -16
- package/dist/admin.js.map +1 -1
- package/dist/api.d.ts +10281 -2216
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +4174 -1240
- package/dist/api.js.map +1 -1
- package/dist/arcBoardJoin.d.ts +38 -0
- package/dist/arcBoardJoin.d.ts.map +1 -0
- package/dist/arcBoardJoin.js +37 -0
- package/dist/arcBoardJoin.js.map +1 -0
- package/dist/arcPreview.d.ts +49 -0
- package/dist/arcPreview.d.ts.map +1 -0
- package/dist/arcPreview.js +65 -0
- package/dist/arcPreview.js.map +1 -0
- package/dist/audio.d.ts +259 -16
- package/dist/audio.d.ts.map +1 -1
- package/dist/audio.js +605 -114
- package/dist/audio.js.map +1 -1
- package/dist/audioDsp.d.ts +45 -0
- package/dist/audioDsp.d.ts.map +1 -0
- package/dist/audioDsp.js +108 -0
- package/dist/audioDsp.js.map +1 -0
- package/dist/audioProtocol.d.ts +160 -0
- package/dist/audioProtocol.d.ts.map +1 -1
- package/dist/audioProtocol.js +99 -0
- package/dist/audioProtocol.js.map +1 -1
- package/dist/beatTitles.d.ts +33 -0
- package/dist/beatTitles.d.ts.map +1 -0
- package/dist/beatTitles.js +39 -0
- package/dist/beatTitles.js.map +1 -0
- package/dist/castProjection.d.ts +204 -1
- package/dist/castProjection.d.ts.map +1 -1
- package/dist/castProjection.js +202 -0
- package/dist/castProjection.js.map +1 -1
- package/dist/characterGrounding.d.ts +369 -0
- package/dist/characterGrounding.d.ts.map +1 -0
- package/dist/characterGrounding.js +408 -0
- package/dist/characterGrounding.js.map +1 -0
- package/dist/conversation/binding.d.ts +41 -1
- package/dist/conversation/binding.d.ts.map +1 -1
- package/dist/conversation/binding.js +12 -0
- package/dist/conversation/binding.js.map +1 -1
- package/dist/conversation/chatSessionStore.d.ts +178 -0
- package/dist/conversation/chatSessionStore.d.ts.map +1 -0
- package/dist/conversation/chatSessionStore.js +196 -0
- package/dist/conversation/chatSessionStore.js.map +1 -0
- package/dist/conversation/controller.d.ts +60 -0
- package/dist/conversation/controller.d.ts.map +1 -1
- package/dist/conversation/controller.js +104 -3
- package/dist/conversation/controller.js.map +1 -1
- package/dist/conversation/index.d.ts +2 -0
- package/dist/conversation/index.d.ts.map +1 -1
- package/dist/conversation/index.js +2 -0
- package/dist/conversation/index.js.map +1 -1
- package/dist/conversation/participant.d.ts +16 -0
- package/dist/conversation/participant.d.ts.map +1 -1
- package/dist/conversation/readSequencer.d.ts +38 -0
- package/dist/conversation/readSequencer.d.ts.map +1 -0
- package/dist/conversation/readSequencer.js +42 -0
- package/dist/conversation/readSequencer.js.map +1 -0
- package/dist/conversation/roster.d.ts +5 -1
- package/dist/conversation/roster.d.ts.map +1 -1
- package/dist/conversation/roster.js.map +1 -1
- package/dist/conversation/rosterProjection.d.ts +74 -1
- package/dist/conversation/rosterProjection.d.ts.map +1 -1
- package/dist/conversation/rosterProjection.js +135 -1
- package/dist/conversation/rosterProjection.js.map +1 -1
- package/dist/conversation/runtime.d.ts +20 -3
- package/dist/conversation/runtime.d.ts.map +1 -1
- package/dist/conversation/runtime.js +66 -7
- package/dist/conversation/runtime.js.map +1 -1
- package/dist/conversation/types.d.ts +43 -4
- package/dist/conversation/types.d.ts.map +1 -1
- package/dist/conversation/voice.d.ts +290 -13
- package/dist/conversation/voice.d.ts.map +1 -1
- package/dist/conversation/voice.js +565 -42
- package/dist/conversation/voice.js.map +1 -1
- package/dist/creatorCuration.d.ts +134 -0
- package/dist/creatorCuration.d.ts.map +1 -0
- package/dist/creatorCuration.js +228 -0
- package/dist/creatorCuration.js.map +1 -0
- package/dist/creatorDashboard.d.ts +155 -0
- package/dist/creatorDashboard.d.ts.map +1 -0
- package/dist/creatorDashboard.js +237 -0
- package/dist/creatorDashboard.js.map +1 -0
- package/dist/creatorUniverse.d.ts +95 -0
- package/dist/creatorUniverse.d.ts.map +1 -0
- package/dist/creatorUniverse.js +136 -0
- package/dist/creatorUniverse.js.map +1 -0
- package/dist/curationWrite.d.ts +76 -0
- package/dist/curationWrite.d.ts.map +1 -0
- package/dist/curationWrite.js +106 -0
- package/dist/curationWrite.js.map +1 -0
- package/dist/designTokens.d.ts +64 -0
- package/dist/designTokens.d.ts.map +1 -0
- package/dist/designTokens.js +117 -0
- package/dist/designTokens.js.map +1 -0
- package/dist/dialogAttribution.d.ts +79 -0
- package/dist/dialogAttribution.d.ts.map +1 -0
- package/dist/dialogAttribution.js +144 -0
- package/dist/dialogAttribution.js.map +1 -0
- package/dist/dmRunWorldReadiness.d.ts +605 -0
- package/dist/dmRunWorldReadiness.d.ts.map +1 -0
- package/dist/dmRunWorldReadiness.js +775 -0
- package/dist/dmRunWorldReadiness.js.map +1 -0
- package/dist/domains/access.d.ts +32 -0
- package/dist/domains/access.d.ts.map +1 -0
- package/dist/domains/access.js +43 -0
- package/dist/domains/access.js.map +1 -0
- package/dist/domains/adventureDefinitions.d.ts +159 -0
- package/dist/domains/adventureDefinitions.d.ts.map +1 -0
- package/dist/domains/adventureDefinitions.js +168 -0
- package/dist/domains/adventureDefinitions.js.map +1 -0
- package/dist/domains/adventures.d.ts +329 -0
- package/dist/domains/adventures.d.ts.map +1 -0
- package/dist/domains/adventures.js +359 -0
- package/dist/domains/adventures.js.map +1 -0
- package/dist/domains/arcs.d.ts +146 -0
- package/dist/domains/arcs.d.ts.map +1 -0
- package/dist/domains/arcs.js +202 -0
- package/dist/domains/arcs.js.map +1 -0
- package/dist/domains/artifacts.d.ts +259 -0
- package/dist/domains/artifacts.d.ts.map +1 -0
- package/dist/domains/artifacts.js +125 -0
- package/dist/domains/artifacts.js.map +1 -0
- package/dist/domains/chat.d.ts +158 -0
- package/dist/domains/chat.d.ts.map +1 -0
- package/dist/domains/chat.js +224 -0
- package/dist/domains/chat.js.map +1 -0
- package/dist/domains/decisions.d.ts +31 -0
- package/dist/domains/decisions.d.ts.map +1 -0
- package/dist/domains/decisions.js +42 -0
- package/dist/domains/decisions.js.map +1 -0
- package/dist/domains/documents.d.ts +218 -0
- package/dist/domains/documents.d.ts.map +1 -0
- package/dist/domains/documents.js +252 -0
- package/dist/domains/documents.js.map +1 -0
- package/dist/domains/enhancements.d.ts +106 -0
- package/dist/domains/enhancements.d.ts.map +1 -0
- package/dist/domains/enhancements.js +160 -0
- package/dist/domains/enhancements.js.map +1 -0
- package/dist/domains/graph.d.ts +454 -0
- package/dist/domains/graph.d.ts.map +1 -0
- package/dist/domains/graph.js +648 -0
- package/dist/domains/graph.js.map +1 -0
- package/dist/domains/images.d.ts +220 -0
- package/dist/domains/images.d.ts.map +1 -0
- package/dist/domains/images.js +307 -0
- package/dist/domains/images.js.map +1 -0
- package/dist/domains/ingestion.d.ts +312 -0
- package/dist/domains/ingestion.d.ts.map +1 -0
- package/dist/domains/ingestion.js +495 -0
- package/dist/domains/ingestion.js.map +1 -0
- package/dist/domains/me.d.ts +21 -0
- package/dist/domains/me.d.ts.map +1 -0
- package/dist/domains/me.js +23 -0
- package/dist/domains/me.js.map +1 -0
- package/dist/domains/orgs.d.ts +47 -0
- package/dist/domains/orgs.d.ts.map +1 -0
- package/dist/domains/orgs.js +75 -0
- package/dist/domains/orgs.js.map +1 -0
- package/dist/domains/personas.d.ts +135 -0
- package/dist/domains/personas.d.ts.map +1 -0
- package/dist/domains/personas.js +316 -0
- package/dist/domains/personas.js.map +1 -0
- package/dist/domains/projects.d.ts +53 -0
- package/dist/domains/projects.d.ts.map +1 -0
- package/dist/domains/projects.js +94 -0
- package/dist/domains/projects.js.map +1 -0
- package/dist/domains/quests.d.ts +431 -0
- package/dist/domains/quests.d.ts.map +1 -0
- package/dist/domains/quests.js +61 -0
- package/dist/domains/quests.js.map +1 -0
- package/dist/domains/reactor.d.ts +98 -0
- package/dist/domains/reactor.d.ts.map +1 -0
- package/dist/domains/reactor.js +131 -0
- package/dist/domains/reactor.js.map +1 -0
- package/dist/domains/showcase.d.ts +28 -0
- package/dist/domains/showcase.d.ts.map +1 -0
- package/dist/domains/showcase.js +28 -0
- package/dist/domains/showcase.js.map +1 -0
- package/dist/domains/storyboards.d.ts +1253 -0
- package/dist/domains/storyboards.d.ts.map +1 -0
- package/dist/domains/storyboards.js +781 -0
- package/dist/domains/storyboards.js.map +1 -0
- package/dist/domains/studioSettings.d.ts +39 -0
- package/dist/domains/studioSettings.d.ts.map +1 -0
- package/dist/domains/studioSettings.js +80 -0
- package/dist/domains/studioSettings.js.map +1 -0
- package/dist/domains/universes.d.ts +191 -0
- package/dist/domains/universes.d.ts.map +1 -0
- package/dist/domains/universes.js +276 -0
- package/dist/domains/universes.js.map +1 -0
- package/dist/domains/userDefaults.d.ts +18 -0
- package/dist/domains/userDefaults.d.ts.map +1 -0
- package/dist/domains/userDefaults.js +27 -0
- package/dist/domains/userDefaults.js.map +1 -0
- package/dist/domains/visemeBundles.d.ts +262 -0
- package/dist/domains/visemeBundles.d.ts.map +1 -0
- package/dist/domains/visemeBundles.js +373 -0
- package/dist/domains/visemeBundles.js.map +1 -0
- package/dist/domains/workflows.d.ts +142 -0
- package/dist/domains/workflows.d.ts.map +1 -0
- package/dist/domains/workflows.js +245 -0
- package/dist/domains/workflows.js.map +1 -0
- package/dist/enhancementDiff.d.ts +56 -0
- package/dist/enhancementDiff.d.ts.map +1 -0
- package/dist/enhancementDiff.js +110 -0
- package/dist/enhancementDiff.js.map +1 -0
- package/dist/generated/contract.d.ts +372 -0
- package/dist/generated/contract.d.ts.map +1 -0
- package/dist/generated/contract.js +390 -0
- package/dist/generated/contract.js.map +1 -0
- package/dist/graphSchema.d.ts +36 -5
- package/dist/graphSchema.d.ts.map +1 -1
- package/dist/graphSchema.js +88 -2
- package/dist/graphSchema.js.map +1 -1
- package/dist/http.d.ts +70 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +263 -11
- package/dist/http.js.map +1 -1
- package/dist/identity.d.ts +81 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +65 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +118 -0
- package/dist/index.js.map +1 -1
- package/dist/messageContent.d.ts +174 -0
- package/dist/messageContent.d.ts.map +1 -0
- package/dist/messageContent.js +405 -0
- package/dist/messageContent.js.map +1 -0
- package/dist/mutationEpoch.d.ts +83 -0
- package/dist/mutationEpoch.d.ts.map +1 -0
- package/dist/mutationEpoch.js +109 -0
- package/dist/mutationEpoch.js.map +1 -0
- package/dist/obo.d.ts +144 -0
- package/dist/obo.d.ts.map +1 -0
- package/dist/obo.js +135 -0
- package/dist/obo.js.map +1 -0
- package/dist/opusTransport.d.ts +113 -0
- package/dist/opusTransport.d.ts.map +1 -0
- package/dist/opusTransport.js +170 -0
- package/dist/opusTransport.js.map +1 -0
- package/dist/pagination.d.ts +18 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +26 -0
- package/dist/pagination.js.map +1 -0
- package/dist/platformAssistant.d.ts +55 -1
- package/dist/platformAssistant.d.ts.map +1 -1
- package/dist/platformAssistant.js +39 -1
- package/dist/platformAssistant.js.map +1 -1
- package/dist/pollUtils.d.ts +19 -0
- package/dist/pollUtils.d.ts.map +1 -0
- package/dist/pollUtils.js +35 -0
- package/dist/pollUtils.js.map +1 -0
- package/dist/questLog.d.ts +232 -0
- package/dist/questLog.d.ts.map +1 -0
- package/dist/questLog.js +522 -0
- package/dist/questLog.js.map +1 -0
- package/dist/reactor/dmDirectiveToExperience.d.ts +300 -0
- package/dist/reactor/dmDirectiveToExperience.d.ts.map +1 -0
- package/dist/reactor/dmDirectiveToExperience.js +401 -0
- package/dist/reactor/dmDirectiveToExperience.js.map +1 -0
- package/dist/reactor/dmSceneControlPrompt.d.ts +40 -0
- package/dist/reactor/dmSceneControlPrompt.d.ts.map +1 -0
- package/dist/reactor/dmSceneControlPrompt.js +145 -0
- package/dist/reactor/dmSceneControlPrompt.js.map +1 -0
- package/dist/reactor/dmWorldEntry.d.ts +1278 -0
- package/dist/reactor/dmWorldEntry.d.ts.map +1 -0
- package/dist/reactor/dmWorldEntry.js +1396 -0
- package/dist/reactor/dmWorldEntry.js.map +1 -0
- package/dist/reactor/framePromptCompaction.d.ts +223 -0
- package/dist/reactor/framePromptCompaction.d.ts.map +1 -0
- package/dist/reactor/framePromptCompaction.js +393 -0
- package/dist/reactor/framePromptCompaction.js.map +1 -0
- package/dist/reactor/frameWorldBind.d.ts +86 -0
- package/dist/reactor/frameWorldBind.d.ts.map +1 -0
- package/dist/reactor/frameWorldBind.js +79 -0
- package/dist/reactor/frameWorldBind.js.map +1 -0
- package/dist/reactor/happyOysterSeed.d.ts +166 -0
- package/dist/reactor/happyOysterSeed.d.ts.map +1 -0
- package/dist/reactor/happyOysterSeed.js +233 -0
- package/dist/reactor/happyOysterSeed.js.map +1 -0
- package/dist/reactor/happyOysterWalk.d.ts +274 -0
- package/dist/reactor/happyOysterWalk.d.ts.map +1 -0
- package/dist/reactor/happyOysterWalk.js +407 -0
- package/dist/reactor/happyOysterWalk.js.map +1 -0
- package/dist/reactor/happyOysterWorld.d.ts +718 -0
- package/dist/reactor/happyOysterWorld.d.ts.map +1 -0
- package/dist/reactor/happyOysterWorld.js +826 -0
- package/dist/reactor/happyOysterWorld.js.map +1 -0
- package/dist/reactor/heliosCommandDispatcher.d.ts.map +1 -1
- package/dist/reactor/heliosCommandDispatcher.js +5 -2
- package/dist/reactor/heliosCommandDispatcher.js.map +1 -1
- package/dist/reactor/hiddenWorldLifecycle.d.ts +101 -0
- package/dist/reactor/hiddenWorldLifecycle.d.ts.map +1 -0
- package/dist/reactor/hiddenWorldLifecycle.js +119 -0
- package/dist/reactor/hiddenWorldLifecycle.js.map +1 -0
- package/dist/reactor/imageCanvas.d.ts +15 -0
- package/dist/reactor/imageCanvas.d.ts.map +1 -0
- package/dist/reactor/imageCanvas.js +33 -0
- package/dist/reactor/imageCanvas.js.map +1 -0
- package/dist/reactor/index.d.ts +20 -0
- package/dist/reactor/index.d.ts.map +1 -1
- package/dist/reactor/index.js +81 -0
- package/dist/reactor/index.js.map +1 -1
- package/dist/reactor/longLiveCommandDispatcher.d.ts +23 -8
- package/dist/reactor/longLiveCommandDispatcher.d.ts.map +1 -1
- package/dist/reactor/longLiveCommandDispatcher.js +16 -4
- package/dist/reactor/longLiveCommandDispatcher.js.map +1 -1
- package/dist/reactor/longLiveSceneEntry.d.ts +203 -0
- package/dist/reactor/longLiveSceneEntry.d.ts.map +1 -0
- package/dist/reactor/longLiveSceneEntry.js +280 -0
- package/dist/reactor/longLiveSceneEntry.js.map +1 -0
- package/dist/reactor/momentCut.d.ts +153 -0
- package/dist/reactor/momentCut.d.ts.map +1 -0
- package/dist/reactor/momentCut.js +142 -0
- package/dist/reactor/momentCut.js.map +1 -0
- package/dist/reactor/promptAddonRegistry.d.ts +39 -3
- package/dist/reactor/promptAddonRegistry.d.ts.map +1 -1
- package/dist/reactor/promptAddonRegistry.js +44 -5
- package/dist/reactor/promptAddonRegistry.js.map +1 -1
- package/dist/reactor/promptTemplatePreview.d.ts +97 -0
- package/dist/reactor/promptTemplatePreview.d.ts.map +1 -0
- package/dist/reactor/promptTemplatePreview.js +185 -0
- package/dist/reactor/promptTemplatePreview.js.map +1 -0
- package/dist/reactor/reactorAvailability.d.ts +80 -0
- package/dist/reactor/reactorAvailability.d.ts.map +1 -0
- package/dist/reactor/reactorAvailability.js +121 -0
- package/dist/reactor/reactorAvailability.js.map +1 -0
- package/dist/reactor/reactorSessionRefusal.d.ts +125 -0
- package/dist/reactor/reactorSessionRefusal.d.ts.map +1 -0
- package/dist/reactor/reactorSessionRefusal.js +197 -0
- package/dist/reactor/reactorSessionRefusal.js.map +1 -0
- package/dist/reactor/reactorTokenScope.d.ts +47 -0
- package/dist/reactor/reactorTokenScope.d.ts.map +1 -0
- package/dist/reactor/reactorTokenScope.js +64 -0
- package/dist/reactor/reactorTokenScope.js.map +1 -0
- package/dist/reactor/resolveDirectorBeats.d.ts +65 -0
- package/dist/reactor/resolveDirectorBeats.d.ts.map +1 -0
- package/dist/reactor/resolveDirectorBeats.js +86 -0
- package/dist/reactor/resolveDirectorBeats.js.map +1 -0
- package/dist/reactor/sanaLiveEdit.d.ts +117 -0
- package/dist/reactor/sanaLiveEdit.d.ts.map +1 -0
- package/dist/reactor/sanaLiveEdit.js +105 -0
- package/dist/reactor/sanaLiveEdit.js.map +1 -0
- package/dist/reactor/sceneEntry.d.ts +66 -9
- package/dist/reactor/sceneEntry.d.ts.map +1 -1
- package/dist/reactor/sceneEntry.js +59 -66
- package/dist/reactor/sceneEntry.js.map +1 -1
- package/dist/reactor/sceneSeedImage.d.ts +199 -0
- package/dist/reactor/sceneSeedImage.d.ts.map +1 -0
- package/dist/reactor/sceneSeedImage.js +239 -0
- package/dist/reactor/sceneSeedImage.js.map +1 -0
- package/dist/reactor/seedImageOrchestrator.d.ts +70 -3
- package/dist/reactor/seedImageOrchestrator.d.ts.map +1 -1
- package/dist/reactor/seedImageOrchestrator.js +92 -28
- package/dist/reactor/seedImageOrchestrator.js.map +1 -1
- package/dist/reactor/toolPromptAddon.d.ts +37 -28
- package/dist/reactor/toolPromptAddon.d.ts.map +1 -1
- package/dist/reactor/toolPromptAddon.js +63 -101
- package/dist/reactor/toolPromptAddon.js.map +1 -1
- package/dist/reactor/worldMintLoop.d.ts +286 -0
- package/dist/reactor/worldMintLoop.d.ts.map +1 -0
- package/dist/reactor/worldMintLoop.js +381 -0
- package/dist/reactor/worldMintLoop.js.map +1 -0
- package/dist/reactor/worldSteerOutcome.d.ts +98 -0
- package/dist/reactor/worldSteerOutcome.d.ts.map +1 -0
- package/dist/reactor/worldSteerOutcome.js +81 -0
- package/dist/reactor/worldSteerOutcome.js.map +1 -0
- package/dist/retryAfter.d.ts +15 -0
- package/dist/retryAfter.d.ts.map +1 -0
- package/dist/retryAfter.js +75 -0
- package/dist/retryAfter.js.map +1 -0
- package/dist/seriesKey.d.ts +31 -0
- package/dist/seriesKey.d.ts.map +1 -0
- package/dist/seriesKey.js +33 -0
- package/dist/seriesKey.js.map +1 -0
- package/dist/sessionRefresh.d.ts +135 -0
- package/dist/sessionRefresh.d.ts.map +1 -0
- package/dist/sessionRefresh.js +215 -0
- package/dist/sessionRefresh.js.map +1 -0
- package/dist/sharedAudioContext.d.ts +39 -0
- package/dist/sharedAudioContext.d.ts.map +1 -0
- package/dist/sharedAudioContext.js +63 -0
- package/dist/sharedAudioContext.js.map +1 -0
- package/dist/singleFlight.d.ts +51 -0
- package/dist/singleFlight.d.ts.map +1 -0
- package/dist/singleFlight.js +87 -0
- package/dist/singleFlight.js.map +1 -0
- package/dist/storyGraph.d.ts +83 -0
- package/dist/storyGraph.d.ts.map +1 -1
- package/dist/storyGraph.js +169 -4
- package/dist/storyGraph.js.map +1 -1
- package/dist/storyboardMask.d.ts +343 -0
- package/dist/storyboardMask.d.ts.map +1 -0
- package/dist/storyboardMask.js +505 -0
- package/dist/storyboardMask.js.map +1 -0
- package/dist/storyboardTimeline.d.ts +93 -0
- package/dist/storyboardTimeline.d.ts.map +1 -0
- package/dist/storyboardTimeline.js +131 -0
- package/dist/storyboardTimeline.js.map +1 -0
- package/dist/studioAutomation.d.ts +104 -0
- package/dist/studioAutomation.d.ts.map +1 -0
- package/dist/studioAutomation.js +178 -0
- package/dist/studioAutomation.js.map +1 -0
- package/dist/tenantClaim.d.ts +86 -0
- package/dist/tenantClaim.d.ts.map +1 -0
- package/dist/tenantClaim.js +164 -0
- package/dist/tenantClaim.js.map +1 -0
- package/dist/timeFormat.d.ts +25 -0
- package/dist/timeFormat.d.ts.map +1 -1
- package/dist/timeFormat.js +56 -0
- package/dist/timeFormat.js.map +1 -1
- package/dist/toolSchemas.d.ts +53 -10
- package/dist/toolSchemas.d.ts.map +1 -1
- package/dist/toolSchemas.js +36 -9
- package/dist/toolSchemas.js.map +1 -1
- package/dist/transport.d.ts +120 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +282 -0
- package/dist/transport.js.map +1 -0
- package/dist/videoGenFacade.d.ts +63 -0
- package/dist/videoGenFacade.d.ts.map +1 -0
- package/dist/videoGenFacade.js +49 -0
- package/dist/videoGenFacade.js.map +1 -0
- package/dist/visemeScheduler.d.ts +24 -2
- package/dist/visemeScheduler.d.ts.map +1 -1
- package/dist/visemeScheduler.js +31 -2
- package/dist/visemeScheduler.js.map +1 -1
- package/dist/vision/VisionPublisher.d.ts +88 -0
- package/dist/vision/VisionPublisher.d.ts.map +1 -1
- package/dist/vision/VisionPublisher.js +196 -13
- package/dist/vision/VisionPublisher.js.map +1 -1
- package/dist/vision/VisionSourceController.d.ts +67 -1
- package/dist/vision/VisionSourceController.d.ts.map +1 -1
- package/dist/vision/VisionSourceController.js +147 -5
- package/dist/vision/VisionSourceController.js.map +1 -1
- package/dist/vision/index.d.ts +2 -1
- package/dist/vision/index.d.ts.map +1 -1
- package/dist/vision/index.js +2 -1
- package/dist/vision/index.js.map +1 -1
- package/dist/vision/sourceKinds.d.ts +18 -5
- package/dist/vision/sourceKinds.d.ts.map +1 -1
- package/dist/vision/sourceKinds.js +15 -2
- package/dist/vision/sourceKinds.js.map +1 -1
- package/dist/vision/types.d.ts +7 -4
- package/dist/vision/types.d.ts.map +1 -1
- package/dist/vision/visionErrors.d.ts +45 -0
- package/dist/vision/visionErrors.d.ts.map +1 -0
- package/dist/vision/visionErrors.js +66 -0
- package/dist/vision/visionErrors.js.map +1 -0
- package/dist/voiceCloneCaption.d.ts +33 -0
- package/dist/voiceCloneCaption.d.ts.map +1 -0
- package/dist/voiceCloneCaption.js +69 -0
- package/dist/voiceCloneCaption.js.map +1 -0
- package/dist/websocket.d.ts +390 -10
- package/dist/websocket.d.ts.map +1 -1
- package/dist/websocket.js +152 -0
- package/dist/websocket.js.map +1 -1
- package/dist/workflowAuthoring.d.ts +139 -0
- package/dist/workflowAuthoring.d.ts.map +1 -0
- package/dist/workflowAuthoring.js +557 -0
- package/dist/workflowAuthoring.js.map +1 -0
- package/package.json +15 -5
- package/src/__tests__/adapters-director.test.ts +9 -6
- package/src/__tests__/adapters-extraction.test.ts +175 -0
- package/src/__tests__/adapters-image.test.ts +66 -0
- package/src/__tests__/adapters-momentPolicy.test.ts +218 -0
- package/src/__tests__/adapters-platform.test.ts +110 -4
- package/src/__tests__/adapters-videogen.test.ts +53 -0
- package/src/__tests__/adapters-world.test.ts +117 -7
- package/src/__tests__/admin.enhancement-defaults.test.ts +115 -0
- package/src/__tests__/admin.test.ts +282 -0
- package/src/__tests__/adventures-world-state.test.ts +156 -0
- package/src/__tests__/adventures.test.ts +111 -1
- package/src/__tests__/api-pollers.test.ts +113 -23
- package/src/__tests__/api.adventure-definitions.test.ts +312 -0
- package/src/__tests__/api.anchor-beat.test.ts +75 -0
- package/src/__tests__/api.arc-approval.test.ts +171 -0
- package/src/__tests__/api.arc-beats-floor.test.ts +56 -0
- package/src/__tests__/api.arc-generation.test.ts +168 -0
- package/src/__tests__/api.arc-templates.test.ts +78 -0
- package/src/__tests__/api.assignVideoSeries.test.ts +81 -0
- package/src/__tests__/api.cast-frame-choices.test.ts +141 -0
- package/src/__tests__/api.cutscene-registry.test.ts +148 -0
- package/src/__tests__/api.enhancement-addition-actions.test.ts +137 -0
- package/src/__tests__/api.enrichVideo-serialization.test.ts +116 -0
- package/src/__tests__/api.extraction-base.test.ts +87 -0
- package/src/__tests__/api.generateVideo-cutscene.test.ts +148 -0
- package/src/__tests__/api.job-pipeline-stages.test.ts +128 -0
- package/src/__tests__/api.list-images-filters.test.ts +6 -3
- package/src/__tests__/api.quest-curation.test.ts +169 -0
- package/src/__tests__/api.reprocessVideo.test.ts +71 -0
- package/src/__tests__/api.scene-split-merge.test.ts +129 -0
- package/src/__tests__/api.session-quests.test.ts +184 -0
- package/src/__tests__/api.test.ts +122 -0
- package/src/__tests__/api.transferSeries.test.ts +114 -0
- package/src/__tests__/api.unknown-clusters.test.ts +225 -0
- package/src/__tests__/api.uploadVideo-options.test.ts +156 -0
- package/src/__tests__/arcPreview.test.ts +71 -0
- package/src/__tests__/arcStyleProfile.test.ts +204 -0
- package/src/__tests__/artifacts-delete.test.ts +109 -0
- package/src/__tests__/audio.test.ts +864 -5
- package/src/__tests__/audioDsp.test.ts +196 -0
- package/src/__tests__/audioUnavailable.test.ts +43 -0
- package/src/__tests__/cast.test.ts +10 -1
- package/src/__tests__/castCurationProjection.test.ts +84 -0
- package/src/__tests__/castFramePipelinePending.test.ts +171 -0
- package/src/__tests__/castProjection.test.ts +497 -5
- package/src/__tests__/characterGrounding.test.ts +357 -0
- package/src/__tests__/contract.test.ts +97 -0
- package/src/__tests__/conversation/binding.test.ts +53 -0
- package/src/__tests__/conversation/chatSessionStore.test.ts +243 -0
- package/src/__tests__/conversation/controller.test.ts +328 -0
- package/src/__tests__/conversation/readSequencer.test.ts +52 -0
- package/src/__tests__/conversation/rosterProjection.test.ts +204 -3
- package/src/__tests__/conversation/runtime.test.ts +118 -1
- package/src/__tests__/conversation/voice.test.ts +741 -7
- package/src/__tests__/creatorCuration.test.ts +256 -0
- package/src/__tests__/creatorDashboard.test.ts +444 -0
- package/src/__tests__/creatorUniverse.test.ts +138 -0
- package/src/__tests__/curationWrite.test.ts +179 -0
- package/src/__tests__/decisions.test.ts +89 -0
- package/src/__tests__/designTokens.test.ts +72 -0
- package/src/__tests__/dialogAttribution.test.ts +187 -0
- package/src/__tests__/dmDirectiveToExperience.test.ts +198 -0
- package/src/__tests__/dmWorldEntry.test.ts +2102 -0
- package/src/__tests__/enhancementDiff.test.ts +132 -0
- package/src/__tests__/experienceModelCatalog.test.ts +292 -0
- package/src/__tests__/extractionStageState.test.ts +67 -0
- package/src/__tests__/getVideo.test.ts +95 -0
- package/src/__tests__/graphReadAfterWrite.test.ts +211 -0
- package/src/__tests__/graphSchema.test.ts +55 -4
- package/src/__tests__/happyOysterSeed.test.ts +208 -0
- package/src/__tests__/happyOysterWorld.test.ts +1241 -0
- package/src/__tests__/happyOysterWorldRefusal.test.ts +224 -0
- package/src/__tests__/hiddenWorldLifecycle.test.ts +203 -0
- package/src/__tests__/http.session-refresh.test.ts +424 -0
- package/src/__tests__/http.test.ts +316 -0
- package/src/__tests__/identity.test.ts +132 -0
- package/src/__tests__/loadBundleManifest.test.ts +192 -22
- package/src/__tests__/longLiveSceneEntry.test.ts +371 -0
- package/src/__tests__/me.test.ts +74 -0
- package/src/__tests__/messageContent.test.ts +395 -0
- package/src/__tests__/momentCut.test.ts +229 -0
- package/src/__tests__/mutationEpoch.test.ts +218 -0
- package/src/__tests__/obo.test.ts +159 -0
- package/src/__tests__/opusTransport.test.ts +182 -0
- package/src/__tests__/opusTransportLibopus.test.ts +125 -0
- package/src/__tests__/orgs.test.ts +229 -0
- package/src/__tests__/persona-generation.test.ts +187 -1
- package/src/__tests__/platformAssistant.test.ts +140 -0
- package/src/__tests__/projects.test.ts +338 -0
- package/src/__tests__/promptTemplatePreview.test.ts +160 -0
- package/src/__tests__/reactor/__fixtures__/realFramePromptText.ts +23 -0
- package/src/__tests__/reactor/api-reactor.test.ts +60 -21
- package/src/__tests__/reactor/framePromptCompaction.test.ts +300 -0
- package/src/__tests__/reactor/promptAddonRegistry.test.ts +82 -1
- package/src/__tests__/reactor/reactorTokenScope.test.ts +50 -0
- package/src/__tests__/reactor/resolveDirectorBeats.test.ts +156 -0
- package/src/__tests__/reactor/sceneEntry.test.ts +3 -0
- package/src/__tests__/reactor/sceneSeedImage.test.ts +361 -0
- package/src/__tests__/reactor/seedImageOrchestrator.test.ts +43 -5
- package/src/__tests__/reactor/toolPromptAddon.test.ts +34 -42
- package/src/__tests__/reactor-happyOysterWalk.test.ts +294 -0
- package/src/__tests__/reactorAvailability.test.ts +217 -0
- package/src/__tests__/reactorSessionRefusal.test.ts +189 -0
- package/src/__tests__/regeneration.test.ts +9 -9
- package/src/__tests__/reprocessBlockedReason.test.ts +30 -0
- package/src/__tests__/retryAfter.test.ts +65 -0
- package/src/__tests__/roleClaim.test.ts +102 -0
- package/src/__tests__/sanaLiveEdit.test.ts +84 -0
- package/src/__tests__/seriesKey.test.ts +24 -0
- package/src/__tests__/settings-set9.test.ts +238 -0
- package/src/__tests__/singleFlight.test.ts +348 -0
- package/src/__tests__/storyGraph.test.ts +111 -1
- package/src/__tests__/storyboardFrameCutscene.test.ts +115 -0
- package/src/__tests__/storyboardMask.test.ts +527 -0
- package/src/__tests__/storyboardTimeline.test.ts +228 -0
- package/src/__tests__/storyboards.test.ts +639 -0
- package/src/__tests__/studioAutomation.test.ts +325 -0
- package/src/__tests__/toolSchemas.test.ts +11 -18
- package/src/__tests__/transport.test.ts +312 -0
- package/src/__tests__/videoGenFacade.test.ts +141 -0
- package/src/__tests__/videoGraph.test.ts +43 -1
- package/src/__tests__/visemeScheduler.test.ts +55 -1
- package/src/__tests__/visibility.test.ts +143 -0
- package/src/__tests__/voiceCloneCaption.test.ts +80 -0
- package/src/__tests__/voiceFallback.test.ts +55 -0
- package/src/__tests__/websocket-error-turn-ended.test.ts +49 -0
- package/src/__tests__/websocket-session-attach.test.ts +288 -0
- package/src/__tests__/websocket-vision.test.ts +141 -0
- package/src/__tests__/websocket.test.ts +75 -1
- package/src/__tests__/workflowAuthoring.test.ts +187 -0
- package/src/__tests__/workflows.test.ts +640 -0
- package/src/__tests__/worldMintLoop.test.ts +448 -0
- package/src/__tests__/worldModelPreference.test.ts +302 -0
- package/src/__tests__/worldModelTradeoffs.test.ts +89 -0
- package/src/__tests__/worldSteerOutcome.test.ts +62 -0
- package/src/adapters/capabilities.ts +39 -3
- package/src/adapters/directorAdapter.ts +5 -4
- package/src/adapters/experienceModelCatalog.ts +538 -0
- package/src/adapters/extractionAdapter.ts +150 -0
- package/src/adapters/imageAdapter.ts +5 -1
- package/src/adapters/index.ts +104 -17
- package/src/adapters/momentDirective.ts +109 -0
- package/src/adapters/momentPolicy.ts +209 -0
- package/src/adapters/registry.ts +1 -1
- package/src/adapters/videoGenAdapter.ts +124 -0
- package/src/adapters/worldAdapter.ts +221 -16
- package/src/adapters/worldModelPreference.ts +247 -0
- package/src/adapters/worldModelTradeoffs.ts +247 -0
- package/src/admin.ts +842 -16
- package/src/api.ts +12670 -3446
- package/src/arcBoardJoin.ts +46 -0
- package/src/arcPreview.ts +103 -0
- package/src/audio.ts +691 -130
- package/src/audioDsp.ts +132 -0
- package/src/audioProtocol.ts +235 -0
- package/src/beatTitles.ts +51 -0
- package/src/castProjection.ts +311 -0
- package/src/characterGrounding.ts +491 -0
- package/src/conversation/binding.ts +53 -1
- package/src/conversation/chatSessionStore.ts +281 -0
- package/src/conversation/controller.ts +135 -3
- package/src/conversation/index.ts +2 -0
- package/src/conversation/participant.ts +16 -0
- package/src/conversation/readSequencer.ts +55 -0
- package/src/conversation/roster.ts +5 -1
- package/src/conversation/rosterProjection.ts +166 -2
- package/src/conversation/runtime.ts +66 -7
- package/src/conversation/types.ts +43 -4
- package/src/conversation/voice.ts +655 -51
- package/src/creatorCuration.ts +316 -0
- package/src/creatorDashboard.ts +344 -0
- package/src/creatorUniverse.ts +222 -0
- package/src/curationWrite.ts +108 -0
- package/src/designTokens.ts +157 -0
- package/src/dialogAttribution.ts +182 -0
- package/src/dmRunWorldReadiness.ts +1168 -0
- package/src/domains/access.ts +92 -0
- package/src/domains/adventureDefinitions.ts +313 -0
- package/src/domains/adventures.ts +557 -0
- package/src/domains/arcs.ts +350 -0
- package/src/domains/artifacts.ts +349 -0
- package/src/domains/chat.ts +338 -0
- package/src/domains/decisions.ts +62 -0
- package/src/domains/documents.ts +389 -0
- package/src/domains/enhancements.ts +259 -0
- package/src/domains/graph.ts +959 -0
- package/src/domains/images.ts +451 -0
- package/src/domains/ingestion.ts +695 -0
- package/src/domains/me.ts +27 -0
- package/src/domains/orgs.ts +168 -0
- package/src/domains/personas.ts +433 -0
- package/src/domains/projects.ts +177 -0
- package/src/domains/quests.ts +587 -0
- package/src/domains/reactor.ts +163 -0
- package/src/domains/showcase.ts +35 -0
- package/src/domains/storyboards.ts +1698 -0
- package/src/domains/studioSettings.ts +149 -0
- package/src/domains/universes.ts +433 -0
- package/src/domains/userDefaults.ts +37 -0
- package/src/domains/visemeBundles.ts +541 -0
- package/src/domains/workflows.ts +376 -0
- package/src/enhancementDiff.ts +171 -0
- package/src/generated/contract.ts +1011 -0
- package/src/graphSchema.ts +154 -6
- package/src/http.ts +295 -11
- package/src/identity.ts +123 -0
- package/src/index.ts +131 -0
- package/src/messageContent.ts +500 -0
- package/src/mutationEpoch.ts +107 -0
- package/src/obo.ts +201 -0
- package/src/opusTransport.ts +268 -0
- package/src/pagination.ts +29 -0
- package/src/platformAssistant.ts +97 -1
- package/src/pollUtils.ts +35 -0
- package/src/questLog.ts +704 -0
- package/src/reactor/dmDirectiveToExperience.ts +636 -0
- package/src/reactor/dmSceneControlPrompt.ts +152 -0
- package/src/reactor/dmWorldEntry.ts +2226 -0
- package/src/reactor/framePromptCompaction.ts +544 -0
- package/src/reactor/frameWorldBind.ts +133 -0
- package/src/reactor/happyOysterSeed.ts +329 -0
- package/src/reactor/happyOysterWalk.ts +541 -0
- package/src/reactor/happyOysterWorld.ts +1270 -0
- package/src/reactor/heliosCommandDispatcher.ts +5 -1
- package/src/reactor/hiddenWorldLifecycle.ts +182 -0
- package/src/reactor/imageCanvas.ts +38 -0
- package/src/reactor/index.ts +81 -0
- package/src/reactor/longLiveCommandDispatcher.ts +23 -8
- package/src/reactor/longLiveSceneEntry.ts +409 -0
- package/src/reactor/momentCut.ts +219 -0
- package/src/reactor/promptAddonRegistry.ts +83 -5
- package/src/reactor/promptTemplatePreview.ts +240 -0
- package/src/reactor/reactorAvailability.ts +155 -0
- package/src/reactor/reactorSessionRefusal.ts +260 -0
- package/src/reactor/reactorTokenScope.ts +69 -0
- package/src/reactor/resolveDirectorBeats.ts +140 -0
- package/src/reactor/sanaLiveEdit.ts +158 -0
- package/src/reactor/sceneEntry.ts +106 -88
- package/src/reactor/sceneSeedImage.ts +338 -0
- package/src/reactor/seedImageOrchestrator.ts +116 -34
- package/src/reactor/toolPromptAddon.ts +66 -102
- package/src/reactor/worldMintLoop.ts +545 -0
- package/src/reactor/worldSteerOutcome.ts +132 -0
- package/src/retryAfter.ts +71 -0
- package/src/seriesKey.ts +42 -0
- package/src/sessionRefresh.ts +237 -0
- package/src/sharedAudioContext.ts +67 -0
- package/src/singleFlight.ts +91 -0
- package/src/storyGraph.ts +247 -4
- package/src/storyboardMask.ts +756 -0
- package/src/storyboardTimeline.ts +220 -0
- package/src/studioAutomation.ts +208 -0
- package/src/tenantClaim.ts +170 -0
- package/src/timeFormat.ts +51 -0
- package/src/toolSchemas.ts +39 -10
- package/src/transport.ts +327 -0
- package/src/videoGenFacade.ts +90 -0
- package/src/visemeScheduler.ts +36 -3
- package/src/vision/VisionPublisher.ts +204 -14
- package/src/vision/VisionSourceController.ts +187 -6
- package/src/vision/__tests__/VisionPublisher.kvs.test.ts +50 -0
- package/src/vision/__tests__/VisionPublisher.test.ts +291 -0
- package/src/vision/__tests__/VisionSourceController.test.ts +376 -6
- package/src/vision/index.ts +5 -1
- package/src/vision/sourceKinds.ts +19 -5
- package/src/vision/types.ts +7 -4
- package/src/vision/visionErrors.ts +70 -0
- package/src/voiceCloneCaption.ts +77 -0
- package/src/websocket.ts +542 -9
- package/src/workflowAuthoring.ts +664 -0
package/README.md
CHANGED
|
@@ -1,194 +1,486 @@
|
|
|
1
1
|
# @escapeaihq/client-core
|
|
2
2
|
|
|
3
|
-
Framework-agnostic
|
|
3
|
+
Framework-agnostic client building blocks for the Seer video-reasoning platform: a typed REST
|
|
4
|
+
client, a reconnecting chat WebSocket, browser audio I/O with viseme lip-sync, WebRTC vision
|
|
5
|
+
publishing, and pure projections over the story graph.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
Vanilla TypeScript — no React or Vue dependency, and no DOM work beyond the Web Audio, WebSocket
|
|
8
|
+
and WebRTC APIs it exists to wrap. The same source backs a React (Next.js) app and a Vue (Nuxt)
|
|
9
|
+
app.
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
## Install
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npm install @escapeaihq/client-core
|
|
15
|
+
```
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
| `graphSchema` | **0.12.0:** Graph-schema vocabulary mirrored from the backend single source of truth (`shared/graph_schema.py` + `shared/provenance.py`). Types `GraphNodeLabel`, `GraphRelationshipType`; two **separate** provenance unions `StoryGraphProvenance` (`'pegasus' \| 'user' \| 'document' \| 'regenerated'`) and `MemoryFactProvenance` (`'chat' \| 'document' \| 'system' \| 'regenerated'`) — never merged. Runtime constants `GRAPH_NODE_LABELS`, `GRAPH_RELATIONSHIP_TYPES`, `GRAPH_PRIMARY_KEY`, `GRAPH_EDITABLE_NODE_PROPERTIES`, `GRAPH_EDITABLE_RELATIONSHIP_PROPERTIES`, `STORY_GRAPH_PROVENANCE_VALUES`, `MEMORY_FACT_PROVENANCE_VALUES`; authored-canon sets `AUTHORED_STORY_PROVENANCE` / `AUTHORED_MEMORY_PROVENANCE` + guards `isStoryGraphProvenance` / `isMemoryFactProvenance`. **0.13.0:** adds a session-scoped memoized `fetchGraphSchema(client)` that fetches the live `GET /graph/schema` payload once per session (resets its cache on rejection so a failed fetch retries; `__resetGraphSchemaCache()` test hook). The graph-editor `PropertyPanel` now sources its **runtime** editable/PK lists from this fetched payload (backend = single runtime source of truth), dropping its hand-maintained literal whitelist. The static `GRAPH_*` unions/constants are **retained** as the typed compile-time vocabulary and a back-compat fallback — they are **not** removed (eliminating the TS copy entirely needs build-time codegen; tech-debt #205). Resolves tech-debt #45 for the graph editor (M7 Phase 1a). **0.15.0 (M7 Phase 3a):** widens `GraphNodeLabel` + `GRAPH_NODE_LABELS` with `Scene`/`PlotBeat`/`CharacterArc` and `GraphRelationshipType` + `GRAPH_RELATIONSHIP_TYPES` with the six user-creatable edges (`RELATES_TO`/`CAUSES`/`SET_IN`/`FEATURES`/`ON_ARC`/`LEADS_TO`); adds `GRAPH_PRIMARY_KEY` (`Scene→sceneId`, `PlotBeat→beatId`, `CharacterArc→arcId`) + `GRAPH_EDITABLE_NODE_PROPERTIES` entries. New exports consumed by the 3b creation UI: `userCreatableLabels` (`['Scene','PlotBeat','CharacterArc']`), `userCreatableEdges` (the six edges), and `allowedPairs` (the TS mirror of the backend `_VALID_EDGE_PAIRS`: `RELATES_TO→[[Entity,Entity]]`, `SET_IN`/`FEATURES→[[Scene,Entity]]`, `ON_ARC→[[PlotBeat,CharacterArc]]`, `LEADS_TO→[[PlotBeat,PlotBeat]]`, `CAUSES→[[Event,Event]]`) — all **additive**. Graph schema only — no tool/MCP schemas. **0.39.0 (R8.1):** adds the studio **read-surface** vocabulary `STUDIO_NODE_LABELS` / `STUDIO_EDGE_TYPES` / `STUDIO_NODE_PROPERTIES` / `STUDIO_CHARACTER_TYPE` (lifted from web `graphVocabulary.ts`, which now re-exports them) so the lifted `storyGraph` projection resolves its vocabulary in one place. |
|
|
15
|
-
| `storyGraph` | **0.39.0 (R8.1):** the pure get_video_graph projection lifted from `web/app/components/studio/storyGraph.ts` (the web module is now a thin re-export shim). `deriveScenes(graph): SceneView[]` (collapsed scenes with featured characters, location, shots, parent act — sorted by act.index then scene.index) and `deriveCast(graph): CharacterView[]` (character entities with aliases, scene memberships, arcs, related characters). Edge-direction-agnostic traversal (CONTAINS/INCLUDES/FEATURES/SET_IN/ON_ARC/RELATES_TO matched by EITHER endpoint). The **single source** of the collapsed-story projection both Studio read-views AND the Director story-timeline mapper (`reactor/storyTimeline.ts`) consume — two copies would drift. Plus view-model types `SceneView`/`CharacterView`/`ArcView`/`ShotView`/`CharacterRef`/`LocationRef`. |
|
|
16
|
-
| `toolSchemas` | **0.11.0:** `AGENT_TOOL_SCHEMAS`, `AGENT_TOOL_NAMES`, `getAgentToolSchema(name)` + types `AgentToolSchema` / `AgentToolName` / `ToolRequestField` / `ToolFieldType` (`src/toolSchemas.ts`). Framework-agnostic TS mirror of the backend's 12 SERVER-SIDE RAG tools whose canonical source is `shared/tool_schemas.py`. Exposes each tool's name, description, endpoint, HTTP method, and request field shapes so clients can introspect the agent's tool surface without copy-pasting strings. Keep in sync when the backend tool list changes (no codegen yet). **Distinct from** the Helios browser-side `BEDROCK_TOOL_SCHEMAS` in `reactor/heliosTools.ts` — different vocabulary, do not converge. |
|
|
17
|
-
| `audioProtocol` | Binary audio frame codec (1-byte tag + 320 samples PCM16); type defs for phoneme/word/barge-in messages |
|
|
18
|
-
| `audio` | `MicrophoneRecorder`, `AudioFramePlayer`, `PlaybackTracker`, `AudioSessionClient`, `AudioPipeline`. Web Audio API based. Clean barge-in via `GainNode` + tracked `activeSources`. Sentence-boundary viseme scheduling. |
|
|
19
|
-
| `visemeScheduler` | Maps Inworld TTS 1.5 phoneme timing to mouth shape changes via `requestAnimationFrame`, locked to `AudioContext.currentTime`. Stops the loop when idle. |
|
|
20
|
-
| `visemeGeometry` | Pure path math: derive inner-lip donut, mouth clip ellipse, teeth/tongue geometry from existing `mouth_paths` data |
|
|
21
|
-
| `websocket` | `ChatWebSocket` — auto-reconnecting wrapper around native WebSocket with text/binary multiplexing. `sendPlaybackState(state: PlaybackState)` publishes `{ action: 'playback_state', videoId, currentTime, shotId?, paused, clientTs }` for cross-device video↔chat sync (`src/websocket.ts:493` `sendPlaybackState` + `src/websocket.ts:69` `PlaybackState`). Fire-and-forget: drops silently when the socket isn't OPEN. See `specs/2026-05-17-cross-device-playback-sync.md`. **Phase 2 vision signaling:** `sendVisionOffer({ sdp, fps })` (`src/websocket.ts:578`), `sendVisionIce({ candidate, sdpMid, sdpMLineIndex })` (`src/websocket.ts:594`), and `sendVisionClose()` (`src/websocket.ts:614`) forward SDP/ICE over the existing chat-ws WebSocket; inbound `vision_answer`, `vision_ice`, and `vision_status` events are surfaced via typed event handlers. **0.49.0 (dashboard A-DM0):** the `ChatWsEvent` union gains a `dm_directive` member `{ type, timestamp?, directive: DmDirectiveKind, params }` (mirrors `ChatEventType.DM_DIRECTIVE` in `shared/chat_dispatcher.py`) — a DM-issued scene-control directive (`enter_world`/`exit_world`/`seek_video`/`set_experience_source`). Additive; `ConversationRuntime.applyFrame` drops it via its default arm (no consumer wired yet — A-DM0 is dark). |
|
|
22
|
-
| `vision/` | **Phase 2:** `VisionPublisher` (`src/vision/VisionPublisher.ts:1`) — framework-agnostic class taking any `MediaStreamTrack` + `ChatWebSocket` + optional `VisionRtcCredentials` and managing the `RTCPeerConnection` lifecycle (SDP offer/answer, ICE trickle, restart-on-disconnect). **Dual-mode signaling**: `credentials.mode === 'kvs'` dynamically imports the optional `amazon-kinesis-video-streams-webrtc` peer dep and connects via Amazon KVS WebRTC against a backend-minted SigV4-presigned wss:// URL; otherwise (or when no credentials passed) uses the existing chat-WS `vision_offer`/`vision_ice`/`vision_close` protocol. `ChatWebSocket.sendVisionAttach({clientId})` (KVS mode only) binds the chat session to the KVS viewer ClientId so the backend dispatcher can find the FrameBuffer. `visionScheduler.ts` adjusts published fps from backend `vision_status` back-pressure (pure helper). `types.ts` exports `VisionPublisherConfig`, `VisionPublisherOptions`, `VisionRtcCredentials`, `VisionStatus`, `VisionStatusListener`, `VisionErrorListener`. Source-agnostic by design — consumers wire `<video>.captureStream()`, `getUserMedia()`, or future Reactor/Helios/PlayCanvas surfaces (Issue #150). **0.10.0 additions:** `toVisionRtcCredentials(response)` (`src/vision/credentials.ts:23`) — pure mapping helper that converts a `ChatVisionRtcCredentialsResponse` API wire shape into `VisionRtcCredentials`, coercing `null` ICE fields to `undefined`. `startVisionPublisher(opts)` (`src/vision/startVisionPublisher.ts:42`) — framework-agnostic factory: construct→subscribe→start→cleanup in one call, returning `VisionPublisherHandle { publisher, stop() }`. Used by both `/watch` and `/chat-ws` React hooks so the construct/teardown sequence has exactly one implementation. **0.31.0 (R3a — vision-source picker):** `sourceKinds.ts` — `VISION_SOURCE_KINDS` (`webcam`/`playing-video`/`server-render`, the frozen constant + `VisionSourceKind` union) and the `VisionSourceDescriptor` tagged union (`{kind:'webcam',constraints?}` vs `{kind:'playing-video'|'server-render', element, waitForFrame?}`) so the controller never queries the DOM. `VisionSourceController.ts` (`src/vision/VisionSourceController.ts:89`) — the framework-agnostic owner of "turn a chosen local source into a published feed": `start(descriptor)` acquires (getUserMedia vs `element.captureStream()`, with the `waitForFrame` black-frame gate lifted from the watch hook), mints credentials AFTER acquisition, then DELEGATES to `startVisionPublisher`; `switchSource()` tears the previous publisher + tracks down BEFORE acquiring the next; `stop()` is idempotent, leaves zero live tracks, and epoch-guards in-flight starts (a racing stop/switch releases the late stream, no error); `currentKind` + `isStarting` expose the published source and the in-flight phase. Environmental failures → `onError` (restartable); misuse (`start()` while active) throws. `ws` must be the SAME authenticated `ChatWebSocket` as the chat turns (frames are keyed to the WS session server-side). Land-dark until R3b–R3d wire the surfaces; sources are LOCAL only (cross-device vision deferred). |
|
|
23
|
-
| `api` | `ApiClient` REST client + all backend response/request type definitions. Constructor takes `baseURL` and `chatBaseUrl` from the caller (no env-var coupling). Image-tool wrappers since 0.3.0: `extractImage`, `regenerateImage`, `pollVisemeBundleUntilDone`. Bundle resolution since 0.5.0: `loadBundleManifest` (handles the inline-vs-S3 body_svg split internally) + canonical `VisemeBundleManifest` type. Reactor/Helios wrappers: `getReactorToken`, `getSeedImageBlob`, `upsampleReactorPrompt`. Chat-model registry (since the LLM-provider phase): `listChatModels()` returns `ChatModelsResponse` with `ChatModelInfo` entries (`id`, `provider`, `capabilities: ChatModelCapability[]`, context window, etc.) — public endpoint so it works before login. **0.10.0 additions:** `getSystemPrompt()` returns `SystemPromptComponents` (`src/api.ts:205,2132`) with `{ film_qa, guardrails, audio_markup, full_default }` — calls `GET /api/v1/chat/system-prompt`. **0.13.0 additions (M7 Phase 1a):** `getGraphSchema()` returns `GraphSchemaResponse` (`{ traceId, labels: Record<string,{pk,editable[]}>, edges: Record<string,{editable[]}> }`) — calls `GET /api/v1/tools/graph/schema`. **Graph-editor signature changes:** `deleteGraphNode` / `deleteGraphEdge` now send **query params** (no request body — tech-debt #42), and `UpdateNodeRequest` / `DeleteNodeRequest` input types **dropped `idProperty`** (backend derives the PK — tech-debt #44). These are input-type narrowings (callers pass less); additive otherwise. **0.14.0 additions (M7 Phase 1b):** `NarrativeAct` (`src/api.ts:751`) gains **optional** `actId` / `index` / `title` / `summary` / `t0` / `t1` — **additive only**; the existing `act` / `timeRange` / `description` fields are retained (per the client-core API-is-a-contract rule, no public export removed/renamed). Acts and `themes` / `mainCharacterNames` are now read **from the graph** — `Act`-labelled `GraphNode`s and the `Video` node properties returned by `getVideoGraph()` — rather than parsed from `getEnrichments()`; `GraphNode` / `VideoGraphResponse` carry `Act` nodes with no schema change. **0.15.0 additions (M7 Phase 3a):** `createGraphNode(data: CreateNodeRequest): Promise<CreateNodeResponse>` (`POST /api/v1/tools/graph/nodes`) and `createGraphEdge(data: CreateEdgeRequest): Promise<CreateEdgeResponse>` (`POST /api/v1/tools/graph/edges`) — both **additive** (no public export removed/renamed, per the API-is-a-contract rule). New request/response types `CreateNodeRequest` `{ videoId, label, properties }` / `CreateNodeResponse` `{ traceId, nodeId, properties }` and `CreateEdgeRequest` `{ videoId, sourceId, targetId, type, properties? }` / `CreateEdgeResponse` `{ traceId, edgeId, properties }`. The 201 JSON body is parsed by the existing `makeRequest` path (only 204 is special-cased); a 422 surfaces the FastAPI `detail` message unchanged. **Source-document CRUD (M7 Phase 4, package version 0.14.0):** shapes mirror the **authoritative backend Pydantic models** (`api/tools/schemas.py`). `uploadDocument(file, meta, onProgress?)` (multipart XHR mirroring `uploadVideo`; file sent under the multipart field **`upload`**; `POST /api/v1/ingestion/documents` → `{ traceId, document }`, HTTP 202 new / 200 idempotent dedupe), `listDocuments({ videoId?, seriesId?, limit?, nextToken? })`, `getDocument(docId)` (→ `{ traceId, document }` — suggestions are **nested** in `document.suggestions`, no top-level field), `acceptSuggestion(docId, sid)` (201 `{ traceId, suggestionId, graphId }`, writes graph node/edge with provenance `document`), `rejectSuggestion(docId, sid)` (204), `deleteDocument(docId)` (204) — all on the tools/ingestion base URL, not chat. New types/constants: `DocumentKind`, `DocumentStatus` + `DOC_STATUS_*`, `SuggestionStatus` + `SUGGESTION_STATUS_*`, `Suggestion`, `DocumentRecord` (mirrors `DocumentResponse`: `suggestions` always present; no `ownerUserId`/`s3Key`/`contentHash`), `UploadDocumentMeta`, `UploadDocumentResponse` `{ traceId, document }`, `ListDocumentsResponse`, `GetDocumentResponse` `{ traceId, document }`, `AcceptSuggestionResponse` `{ traceId, suggestionId, graphId }`. **0.16.0 additions (M7 Phase 6 — narrative regeneration):** `startRegeneration(videoId, request: RegenerateRequest): Promise<RegenerationRunResponse>` (`POST /api/v1/tools/graph/{videoId}/regenerate` → 202; `statusUrl`/`Location` to the run's poll URL; a 409 lock / 429 cap / 422 bad-scope surfaces the FastAPI `detail`), `listRegenerations(videoId, { limit?, cursor? }?)` (`GET .../regenerations` → `RegenerationListResponse` newest-first + `nextCursor`), `getRegeneration(videoId, runId, { signal? }?)` (`GET .../regenerations/{runId}`, 404 absent), and `pollRegenerationUntilDone(videoId, runId, { intervalMs?, timeoutMs?, signal? }?)` (5s cadence, abortable — resolves on `complete`/`cancelled`, throws on `failed`, mirrors `pollVisemeBundleUntilDone`). New types/constants `RegenerationRunStatus` + `REGENERATION_STATUS` const map + `REGENERATION_TERMINAL_STATUSES`, `RegenerationScopeKind` + `REGEN_SCOPE_BARE_KINDS`/`REGEN_SCOPE_TARGETED_KINDS`/`REGEN_SCOPE_SEPARATOR` + `buildRegenerationScope(kind, targetId?)` (builds `acts`/`characters`/`scene:<id>`/`arc:<id>`; throws on a bare+target or targeted-without-id contract violation), `RegenerateRequest` `{ scope, promptAddon? }`, `RegenerationRunResponse` `{ traceId, runId, videoId, scope, status, statusUrl, createdAt, promptAddon?, startedAt?, completedAt?, delta, error? }`, `RegenerationListResponse` `{ traceId, videoId, runs, nextCursor }`. **0.21.0 additions (M9 Story Engine Phase 8a — Adventure Runtime):** `startAdventure(request: StartAdventureRequest, { signal? }?): Promise<AdventureResponse>` (`POST /api/v1/adventures` → 201, `Location` to the session GET URL; a 422 `Persona is not a Dungeon Master` / 404 / 403 surfaces the FastAPI `detail`), `getAdventure(sessionId, { signal? }?): Promise<GetAdventureResponse>` (`GET /api/v1/adventures/{sessionId}`, 404 absent/not-owned), `deleteAdventure(sessionId, { signal? }?): Promise<void>` (`DELETE .../{sessionId}` → 204). New camelCase-wire types `TurnRecord` `{ turn, beatId, summary }`, `AdventureState` `{ sessionId, ownerUserId, storyId, videoId, dmPersonaId, partyPersonaIds, currentBeatId?, visitedBeatIds, flags, inventory, turnHistory, createdAt, updatedAt }`, `StartAdventureRequest` `{ storyId, videoId, dmPersonaId, initialBeatId? }`, `AdventureResponse` `{ traceId, sessionId, state }`, `GetAdventureResponse` `{ traceId, state }`. `PersonaConfig` / `CreatePersonaRequest` / `UpdatePersonaRequest` gain optional snake_case `is_dungeon_master` (read defaults `false`). `ChatWebSocket.send()` options + `buildHelloPayload()` gain optional `adventureSessionId` (spread only when set → land-dark). **0.22.0 additions:** `listAdventures(storyId?, { signal? }?): Promise<ListAdventuresResponse>` (`GET /api/v1/adventures`, owner-scoped newest-first, optional `storyId` filter) + `ListAdventuresResponse` `{ traceId, adventures }`. **0.23.0 additions (M10 Story Engine Phase 9a — multi-persona scene orchestrator):** `addPartyMember(sessionId, personaId, { signal? }?): Promise<GetAdventureResponse>` and `removePartyMember(sessionId, personaId, { signal? }?): Promise<GetAdventureResponse>` — both `PATCH /api/v1/adventures/{sessionId}/party` with `{ action, personaId }` (add: 422 for a DM / non-character / unowned persona; remove: idempotent 200 no-op; 404 for a missing adventure). New types/constants `PARTY_ACTION` (`{ ADD:'add', REMOVE:'remove' }`) + `PartyAction` + `PartyUpdateRequest` `{ action, personaId }`; `StartAdventureRequest` gains optional `partyPersonaIds?: string[]`. `ChatWebSocket.send()` options + `buildHelloPayload()` gain optional `partyPersonaIds?: string[]` (spread only when non-empty → land-dark; advisory — the server's `AdventureState.party_persona_ids` is authoritative). `ChatWsEvent` gains a `turn_changed` member `{ type, timestamp?, personaId, previousPersonaId? }` (mirrors `ChatEventType.TURN_CHANGED`) and an optional `personaId?` on the `token`/`done`/`citation`/`image`/`audio_chunk` members (orchestrator-stamped; undefined elsewhere → land-dark; per-turn TTS voice swap on audio deferred). **R1c additions (Platform Experience Restructure — image adapter registry, no version bump, release is R1e):** `listImageModels(): Promise<ImageModelsResponse>` (`GET /api/v1/images/models`, **authenticated** — unlike chat/models it is NOT in `DEFAULT_PUBLIC_PATHS`; served on the **chat** base URL via `chatRequest`) + `ImageModelInfo` `{ id, displayName, provider, capabilities: string[], isDefault, isFallback }` / `ImageModelsResponse` `{ models }`. **Additive only** (no public export removed/renamed). **0.32.0 additions (Platform Experience Restructure R5a+R5c — cast-with-persona projection):** `getCast(videoId): Promise<CastWithPersonaResponse>` (`GET /api/v1/tools/videos/{videoId}/cast`, tools base URL) — one call returns the character cast pre-joined to bound-persona display fields (the server resolves the PORTRAYS binding; replaces the CastGrid `getVideoGraph`+`listPersonas` client-side `entity_id` join since R5c). New types `CastArc`/`CastScene`/`CastCharacter`/`CastPersonaSummary`/`CastEntry`/`CastWithPersonaResponse` (`CastCharacter.scenes: CastScene[]` carries `{sceneId, title}` so a Cast drawer renders scene titles without the graph payload). New `castWithPersona(response): CastEntry[]` (`src/castProjection.ts`) — the framework-agnostic pure normalizer (deterministic ordering, list coalescing, title/name fallbacks, input never mutated) every Cast consumer shares. **0.32.0 additions (R5b — story-detail graph read):** `getVideoGraph(videoId, detail?)` gains an optional `detail` arg — `GRAPH_DETAIL.STORY` requests the server-collapsed story view (Acts/Scenes/cast/narrative edges; Shots collapsed to per-Scene `shotCount` properties; DialogLine/Event/MENTIONS omitted), `GRAPH_DETAIL.RAW` the full graph; omitting it sends NO query param (byte-identical pre-R5b request). New exports `GRAPH_DETAIL` + `GraphDetail` (mirror of `shared/graph_schema.py`). **0.33.0 additions (Platform Experience Restructure R6b — image filtering params):** `listImages(params)` gains optional `model?: string` + `status?: ImageStatus` filters, mirroring the new `GET /api/v1/images` query params. `model` ids come from R1's image-model registry (discoverable via `listImageModels()`); the backend rejects an unregistered id with 400 — **no client-core image-model descriptor is added** (R1's `imageAdapter.ts` stays the sole catalogue owner). `status` reuses the existing `ImageStatus` union (`ImageRecord['status']`) — no parallel status enum. Omitting both leaves the request byte-identical to 0.32.0 (additive only). **0.44.0 additions (C3a persona-generation, spec Step 11 — auto-generate trigger + job tracking):** `getPersonaGenSettings(): Promise<PersonaGenerationSettings|null>` (`GET /api/v1/personas/settings/generation`, null when unsaved), `updatePersonaGenSettings(body): Promise<PersonaGenerationSettings>` (`PUT` partial merge — `UpdatePersonaGenSettingsRequest` all-optional), `generatePersonasForVideo(videoId): Promise<GeneratePersonasJobResponse>` (`POST /api/v1/videos/{videoId}/personas/generate`, 202 envelope, idempotent on the active `(user,video)` job), `getPersonaJob(jobId): Promise<AutoGenerationJob>` (`GET /api/v1/persona-jobs/{jobId}`, owner-scoped poll — all in `src/api.ts`), and `listPersonasByVideo(sourceVideoId)` + a new optional `sourceVideoId` on `listPersonas({ sourceVideoId })` (→ the `source_video_id` query param). New exported types `PersonaGenerationSettings`, `UpdatePersonaGenSettingsRequest`, `AutoGenerationJob`, `PersonaJobProgress`, `PersonaJobError`, `GeneratePersonasJobResponse`, `PersonaJobStatus`, `PersonaJobErrorStage`; `PersonaConfig` (+`CreatePersonaRequest`/`UpdatePersonaRequest` for the first four) gain optional snake_case `entity_name`/`is_auto_generated`/`source_video_id`/`available_clip_indices`/`clips_used`. **camelCase wire keys** (`jobId`/`traceId`) on `GeneratePersonasJobResponse` ONLY — the backend serializes that model with aliases; `AutoGenerationJob`/`PersonaGenerationSettings` are snake_case (no backend aliases). **0.45.0 additions (C3a persona-generation, spec Step 13 — review/audition page):** `auditionPersona(personaId, body?, { signal? }?): Promise<Blob>` (`POST /api/v1/personas/{id}/audition` — renders a short TTS sample in the persona's current voice; returns the `audio/wav` blob the review page plays via `URL.createObjectURL`+`<audio>`; an omitted body uses the backend default sample text; bypasses the JSON wrapper since the response is binary, same pattern as `getSeedImageBlob`) and `reclonePersona(personaId): Promise<ReclonedPersonaResponse>` (`POST /api/v1/personas/{id}/reclone` — re-clones the voice from a different subset of the cached `persona-clips` WITHOUT re-downloading video; swaps `voice_id`, appends to `clips_used`). New exported types `AuditionRequest`, `ReclonedPersonaResponse` (**camelCase** wire — `personaId`/`voiceId`/`clipsUsed`), `RecloneConflictCode`, and a `RecloneConflictError` class — `reclonePersona` bypasses the generic JSON error path to raise this typed error on a `409` (whose `detail` is a structured object the flattener would render as `[object Object]`) so the review UI can branch on `voice_clone_max_retries_exhausted` vs `no_candidate_clips_remaining` and disable the Reclone control. Additive only; no public export removed/renamed (`../Web-App` pins this package). The persona-gen *pages* (settings/review/list — spec Steps 12–14) consume these. **0.46.0 additions (C3a-f1 — persona-gen trigger relocated to Studio Cast):** `generatePersonasForVideo(videoId, opts?: { entityIds?: string[] })` gains an OPTIONAL second arg — a non-empty `entityIds` sends a snake_case `{ entity_ids: [...] }` body (mirrors the new `GeneratePersonasRequest` backend model) restricting generation to a character subset (Cast per-member "Generate persona"); omitting it (or `entityIds: []`) sends NO body — byte-identical to the prior 1-arg call (whole-video). The prior signature still type-checks (additive). **0.49.0 additions (dashboard A-DM0 — DM scene control):** `DmDirectiveKind` (`'enter_world'|'exit_world'|'seek_video'|'set_experience_source'` — single-sourced with the backend `DM_DIRECTIVE_KINDS`) + `DmDirectiveEvent` `{ type:'dm_directive'; timestamp?; directive: DmDirectiveKind; params: Record<string,unknown> }`. Additive type exports only; no public export removed/renamed. See [CHANGELOG.md](./CHANGELOG.md). |
|
|
24
|
-
| `admin` | **0.19.0 (GitHub #215 Phase 2):** `AdminClient` — the prompt-defaults editor surface. Constructed with the **chat** base URL + session token (the admin router is mounted in `api/chat/app.py`). Methods: `listPromptDefaults()` → `PromptDefaultsListResponse`; `getPromptDefault(key)` / `updatePromptDefault(key, {value})` / `revertPromptDefault(key)` → `PromptDefaultDetail`. Types: `PromptDefaultSource` (`'db'|'code'`), `PromptDefaultSummary`, `PromptDefaultDetail`, `UpdatePromptDefaultRequest`. **0.24.0 (M12 Slice 5 — eval-observability reader):** added `listEvalRuns(params, {signal})` → `EvalRunsListResponse` (one cursor page) and `listAllEvalRuns(params, {signal})` → `AllEvalRunsResult` (`{runs, truncated}`; follows `nextCursor` until null, capped at `MAX_EVAL_RUN_PAGES = 50` — stops not throws, and sets `truncated: true` when the cap is hit with pages still pending so the page warns rather than presenting a partial series as complete). `params` carries the XOR selector `benchmarkId` **or** `promptVersion` (server returns 422 on neither/both) + optional `limit`/`cursor`. Types: `EvalRunSummary`, `EvalRunsListResponse`, `ListEvalRunsParams`, `AllEvalRunsResult` (mirror `api/admin/schemas.py` exactly). The `/observability` web page is the consumer (charts metric scores per `promptVersion`, one line per `modelId`, grouped client-side). **Additive only** — no `ApiClient` export changed. Shares the internal `http.ts` `requestJson` helper that `ApiClient.makeRequest` now also delegates to (DRY, private — not re-exported). The server enforces the editable-key carve-out (extraction keys are not editable → 404 → thrown `Error`). **R6d (read-only regen base prompts):** added `listRegenBasePrompts()` → `RegenBasePromptsResponse` (`GET /api/v1/admin/regen-prompts`; types `RegenBasePrompt`/`RegenBasePromptsResponse` mirror `api/admin/schemas.py`; `editable` always `false`, no write method exists). Also additive on `api.ts`: `RegenerateRequest.appliedDocumentIds?: string[] | null` (cap 20; server silently dedups + drops unknown ids) and `RegenerationRunResponse.appliedDocumentIds?: string[]` mirror the R6c backend fields. **0.47.0 (C4 Phase 3 — admin monitoring tools, data layer):** added a separate read-only `MonitoringClient` (also chat-base + session token) wrapping `/api/v1/admin/monitoring/*`: `listMetrics()` → `MonitoringMetricCatalogResponse` (the allowlist; pick a `metricId` — no raw namespace/name pass-through), `getMetricSeries(metricId, {rangeSeconds, periodSeconds}, {signal})` → `MonitoringMetricSeriesResponse` (CloudWatch GetMetricData; unknown id → 404 → thrown `Error`), `listTraces({jobId, videoId, rangeSeconds}, {signal})` → `MonitoringTraceSummariesResponse` (X-Ray; bad annotation id → 422), `getTraceDetail(xrayTraceId, {signal})` → `MonitoringTraceDetailResponse` (`found=false` when X-Ray has no such trace). Types mirror `api/admin/schemas.py` exactly. **Additive only** — no `ApiClient` export changed. |
|
|
25
|
-
| `reactor/` | Pure builders for the `/interactive` page in seer-agent (and reusable by the Vue Web-App). `buildRegenPrompt(input)` produces deterministic Gemini Flash Image prompts with locked 16:9 + identity guarantees plus a creative-direction escape hatch. `buildUpsamplePrompt(input)` returns `{system, user}` message blocks for any LLM transport, encoding the Helios prompt-guide rules and weaving in entity/persona/previous-prompt context. `aggregateEntityContext` and `aggregatePersonaContext` adapt our existing `ImageRecord` / `EnrichmentRecord` / `PersonaConfig` types into the canonical context shapes. **Phase 2:** `mapEnrichmentToTimeline(enrichment, opts)` consumes a `EnrichmentRecord` and returns a `TimelineBeat[]` (chunk-pinned prompts) for the `/interactive/director` timeline UI. Defensively probes multiple Pegasus result shapes. **Phase 3:** `heliosTools.ts` — `HeliosCommand` (discriminated union), `parseHeliosCommands(text)` (extracts `[SET_SCENE: "…"]`-style inline markers from streamed chat output), `stripHeliosCommands(text)` (removes markers from the displayed transcript), and the future-use `BEDROCK_TOOL_SCHEMAS` Converse-tool-spec export. `toolPromptAddon.ts` — `HELIOS_STEERING_ADDON_ID`, `getHeliosSteeringAddonText()`, idempotent `buildHeliosSteeringSystemPrompt(base)` for personas with `prompt_addon_ids: ['helios-world-steering']`. `entitySearch.ts` — `findEntityImageBySeedName(apiClient, videoId, name)` resolves an entity name to its `ImageRecord` (searches `extracted` then `character`, case-insensitive). Per-`(videoId, category)` in-process cache so repeat SWAP_SEED commands skip the API round-trip; `forceRefresh: true` and `clearEntitySearchCache()` bypass it. `heliosCommandDispatcher.ts` — `dispatchHeliosCommand(cmd, ctx)` executes a `HeliosCommand` against a structural Reactor bridge (`sendCommand` + `uploadFile`); pure async function, no React. `HeliosToolContext.signal?: AbortSignal` cancels in-flight upsample + seed-image work on unmount. `seedImageOrchestrator.ts` — `loadSeedImageFile(imageId, apiClient)` + `sendSeedFileToReactor(file, reactor, opts)` + convenience `loadAndApplySeedImage`. Used by all three `/interactive` React pages AND by the SWAP_SEED branch of the dispatcher, so the load → upload → set_image sequence has exactly one implementation. No `@reactor-team/js-sdk` dependency — that stays in the consuming app. `applyScenePrompt.ts` — `applyScenePrompt({prompt, apiClient, reactor, currentChunk, isRunning, ...})`: shared submit policy for a live Helios session. `!isRunning` → `set_prompt` + `start`; running → `schedule_prompt` at `currentChunk + 2`. Upsample failure falls back to the raw prompt; abort propagates. Used by both `InteractiveController` and the watch-page `HeliosWorldControls` so the two pages cannot diverge. **LongLive-v2 director initiative (Step 2, additive, land-dark — no version bump, R1e releases):** `longLiveCommandDispatcher.ts` — `dispatchLongLiveCommand(cmd, ctx)`, the `dispatchHeliosCommand` analogue for the Reactor **LongLive-v2** world model over the **SAME Reactor transport** (only the `modelName` differs). `LongLiveCommand` is its OWN discriminated union (`set_shot`/`scene_cut`/`schedule_shot`/`schedule_scene_cut`/`pause`/`resume`/`reset`/`set_seed`) — NOT a `HeliosCommand`. Mappings to `reactor.sendCommand`: `set_shot{prompt}` → `set_shot` then `start` **only when `!ctx.hasStarted`** (the opening-shot-then-start guard, mirroring Helios `set_scene` chunk-0); `scene_cut{prompt}` → `scene_cut` (a HARD, memory-purging transition Helios lacks); `schedule_shot`/`schedule_scene_cut` use the snake_case `at_session_chunk` wire field; `pause`/`resume`/`reset` → `{}`; `set_seed{seed}` → `set_seed`. `LongLiveToolContext` is NARROWER than `HeliosToolContext`: `reactor: Pick<HeliosReactorBridge, 'sendCommand'>` (reuses the structural bridge — **no rename, no `uploadFile`**: LongLive is text-to-video with NO image conditioning, hence **NO `swap_seed`**), `hasStarted?`, `signal?`, `onUserWarning?`. Same failure policy: clean abort silent (reuses `isAbortError`), other failures logged + skipped. **SDK-free** (no `@reactor-team/js-sdk` import). **R8.1 (0.39.0):** `storyTimeline.ts` — `deriveStoryTimeline(scenes: SceneView[], options?)` maps the collapsed R5 `detail=story` projection (one `SceneView` per scene) to `TimelineBeat[]`: one beat per scene, prompt grounded in the scene summary + featured-character names + location label, scene-id provenance in the `label`. The **story-graph-driven sibling** of `mapEnrichmentToTimeline` (which stays the labelled FALLBACK for graph-less videos). `chunkDistribution.ts` (internal — NOT barrel-exported) holds the shared `computeChunkIndices`/`enforceSpacing` so BOTH mappers share ONE chunk-distribution algorithm (extracted from `scenesFromEnrichment.ts`; DRY — one place can break). `StoryTimelineOptions` mirrors `MapEnrichmentOptions`. Spec: [`specs/interactive-helios-prototype.md`](../../specs/interactive-helios-prototype.md). |
|
|
26
|
-
| `adapters/` | **R1a (Platform Experience Restructure):** the framework-agnostic model-adapter registry primitive every later R1 adapter (image / world / director domains) registers into. **Zero React / DOM / provider-SDK imports** — same discipline as `reactor/` and `vision/`. `capabilities.ts` — `Capability` is the single capability union, formed by **extending** the existing `ChatModelCapability` (`api.ts:499`, the source of truth that mirrors `shared/model_config.py:CAPABILITY_*`) with the net-new TS-only domains `ImageCapability` (`'image_gen'|'image_edit'|'identity_preserve'`), `WorldCapability` (`'world_stream'|'set_scene'|'swap_seed'|'pause_resume'`), `DirectorCapability` (`'timeline_schedule'|'enrichment_driven'`). There is **no parallel `CAPABILITY` const map** — extend the union, don't re-spell the four chat strings. `registry.ts` — `AdapterRegistry<TDescriptor extends ModelAdapterDescriptor>` ({ `domain`, `routes`, `fallbackRouteName` }): `register()` is additive and **throws on a duplicate id** (no silent overwrite); `get`/`list`/`listWithCapability(cap)`; `resolveRoute(name)` returns the named route's adapter and **degrades to the fallback route's adapter when the route's adapterId is unregistered — NEVER throws** (parity with `shared/model_router.py:344-360`); `satisfies(id, required)` is true iff the id is registered and advertises every required cap. Route names are the exported `ROUTE_DEFAULT`/`ROUTE_FALLBACK`/`ROUTE_HIGH_QUALITY` string constants (the `ROUTE_*` analogue of `shared/model_router.py:56-59`), never inline literals. `ModelAdapterDescriptor.metadata` is opaque/forward-compat — carried, not interpreted. **R1b** adds `chatAdapter.ts` — `loadChatAdapterRegistry(client)` hydrates an `AdapterRegistry<ChatAdapterDescriptor>` from `GET /api/v1/chat/models` and is a **FACADE over the backend**: model selection stays server-side in `shared/model_router.py`, so there is **no `route()` / client-side selection table** here — it only mirrors the catalogue (one descriptor per model, `capabilities` copied VERBATIM) so the UI can list / `listWithCapability` / auto-switch. `ROUTE_DEFAULT`/`ROUTE_FALLBACK` both mirror the resolved default id (parity with `api/chat/app.py:686-697`: `defaultModelId` when present in models, else the first model by `(provider, id)`; empty models → `''` sentinel so the constructor guard still passes and `resolveRoute` degrades to `undefined`, never throws). **R1c** adds `imageAdapter.ts` — `loadImageAdapterRegistry(client)` hydrates an `AdapterRegistry<ImageAdapterDescriptor>` from `GET /api/v1/images/models` (via `ApiClient.listImageModels()`, served on the **chat** base URL since the images API is mounted on the chat app). Same FACADE discipline as the chat adapter — image generation still resolves to Gemini in the pipeline unchanged (R1c is land-dark); this only mirrors the catalogue so a future UI (R6) can list / `listWithCapability('identity_preserve')`. `ROUTE_DEFAULT` mirrors the `isDefault`-flagged model id (else first by id), and `ROUTE_FALLBACK` the `isFallback`-flagged model (the registry's real fallback; mirrors default when none flagged) — empty models → `''` sentinel so the constructor guard still passes and `resolveRoute` degrades to `undefined`. `ImageModelInfo`/`ImageModelsResponse` wire types live in `api.ts` (`capabilities: string[]` — cast to `Capability[]` only inside the adapter to avoid an `api.ts`↔`capabilities.ts` cycle). **R1d** adds `worldAdapter.ts` + `directorAdapter.ts` — the net-new WORLD (step-into-video) and DIRECTOR registries, seeded with the one model that exists today: **Helios**. `worldAdapter.ts` — `WorldAdapterDescriptor` extends `ModelAdapterDescriptor` with `supportedCommands: readonly string[]` (**model-agnostic** — the registry holds heterogeneous world models; a sibling such as a Reactor LongLive adapter has its OWN command vocabulary `set_shot`/`scene_cut`/… that is not a `HeliosCommand`); `heliosWorldAdapter` (`id:'helios'`, provider `'reactor'`, caps `['world_stream','set_scene','swap_seed','pause_resume']`, `supportedCommands` = the EXACT `HeliosCommand` variant set from `reactor/heliosTools.ts:32-37`) **CENTRALIZES the `'helios'` model-name literal** so the R8 page rewire stops hard-coding it; `createWorldRegistry()` pre-registers it with `ROUTE_DEFAULT`+`ROUTE_FALLBACK` both → its id; `requiredCapabilityForCommand(cmd)` is the pure exhaustive-switch mapping (`set_scene`→`'set_scene'`, `swap_seed`→`'swap_seed'`, `pause_world`/`resume_world`→`'pause_resume'`, `reset_world`→`'world_stream'`). `dispatchWorldCommand(adapterId, cmd, ctx)` routes **in FRONT of the existing `dispatchHeliosCommand`** (NOT a rewrite): the Helios branch delegates with **IDENTICAL args** — the live Helios path is UNCHANGED (LAND-DARK) — and an unknown id throws the typed `UnsupportedWorldAdapterError` WITHOUT touching the bridge. It reuses the structural `HeliosReactorBridge` via `HeliosToolContext` — **no `@reactor-team/js-sdk` import**, the adapters/ submodule stays SDK-free. `directorAdapter.ts` — `DirectorAdapterDescriptor` extends `ModelAdapterDescriptor` with `worldAdapterId`; `heliosDirectorAdapter` (`id:'helios-director'`) backs onto `heliosWorldAdapter` and its `capabilities` are the director members `['timeline_schedule','enrichment_driven']` **plus the four world caps it inherits via `worldAdapterId`** (deduped); `createDirectorRegistry()` pre-registers it. **LongLive-v2 director initiative (Step 2 — additive, land-dark, no version bump):** `worldAdapter.ts` adds `longLiveWorldAdapter` (`id:'longlive-v2'`, displayName `'LongLive 2.0'`, provider `'reactor'`, caps `['world_stream','set_scene','scene_cut','pause_resume']`, `supportedCommands` = its 8 LongLive command strings). The **ASYMMETRIC capability matrix** holds via `registry.satisfies`: Helios HAS `swap_seed` and NOT `scene_cut`; LongLive HAS `scene_cut` (a hard memory-purging transition) and NOT `swap_seed` (text-to-video, no image conditioning). `createWorldRegistry()` now registers **both** adapters; **world `ROUTE_DEFAULT`+`ROUTE_FALLBACK` STAY Helios** (plain `/interactive` unchanged — LongLive is resolvable by id + `listWithCapability('scene_cut')` but is NOT the world default). `dispatchWorldCommand` is **widened via FUNCTION OVERLOADS** that keep exact `(adapterId, cmd, ctx)` typing per adapter — `'helios'` → `dispatchHeliosCommand` (BYTE-IDENTICAL to R1d), `'longlive-v2'` → `dispatchLongLiveCommand`, unknown → throw. **No per-command runtime capability gate** (the R1d review removed the unreachable `satisfies` scaffolding): the overloads enforce the cmd/adapter match at compile time, and the asymmetric-matrix INFO is consumed via `registry.satisfies()` by the Step-3 director UI (to hide the seed-image control for LongLive), not a dispatch gate (resolves tech-debt #414). `directorAdapter.ts` adds `longLiveDirectorAdapter` (`id:'longlive-director'`, backs onto `longLiveWorldAdapter`, inherits `scene_cut` + the director members, NOT `swap_seed`). **THE DIRECTOR-DEFAULT FLIP:** `createDirectorRegistry()` registers both directors and points `ROUTE_DEFAULT` → `'longlive-director'`, `ROUTE_FALLBACK` → `'helios-director'` (the world default stays Helios; only the DIRECTOR default flips). LAND-DARK — nothing reads the director route until **Step 3 wires the web director page**; the live `/interactive` and `/interactive/director` pages are UNCHANGED (their `modelName="helios"` literals stay; **R8 migrates the pages**). **Purely additive to client-core** — no existing public export removed/renamed (the sibling Vue Web-App pins this package); Steps 1–2 carried no version bump (the release is R1e). **R1e (0.25.0 — R1's release):** `index.ts` adds the aggregator `createPlatformRegistries(client): Promise<PlatformRegistries>` — the **single entry** every downstream wave imports to get all four registries pre-wired. `world` + `director` are synchronous seeds (Helios world default; LongLive-v2 director default); `chat` + `image` load from their backend catalogues via the existing facades in parallel. It makes NO selection decision — it only composes `loadChatAdapterRegistry`/`loadImageAdapterRegistry`/`createWorldRegistry`/`createDirectorRegistry` (DRY). `PlatformRegistries` = `{ chat, image, world, director }`. The `seer-agent` `web/` `/admin/adapters` showroom inspector is the first consumer; additive-only (no export removed/renamed). |
|
|
27
|
-
| `conversation/` | **R2.1 (0.26.0 — Conversation panel core):** the framework-agnostic, headless **conversation state** primitive that lets React (R2.2) and a game engine (PlayCanvas, R7) render the **same** controller. **Zero DOM** — same discipline as `reactor/`/`adapters/`. `participant.ts` — `ConversationParticipant` `{ participantId; personaId?; role; presence; modelId?; capabilities? }` + the frozen constant objects `ParticipantRole` (`persona`/`dm`/`user`) and `PresenceKind` (`PRESENCE_NONE`/`PRESENCE_FACE_2D`/`PRESENCE_AVATAR_3D`) — constants, never inline literals. `presenceRegistry.ts` — `PresenceRendererRegistry` (mirrors `reactor/promptAddonRegistry.ts`): `register(kind, factory)`/`resolve(kind)`/`has(kind)`; a factory returns an opaque `PresenceHandle` (`mount`/`update`/`destroy`) so React and a game engine register their own renderer; **THROWS on duplicate register** (fail-loud) and **returns the `PRESENCE_NONE` no-op for any unregistered kind** (fail-soft — this is what lets the reserved `PRESENCE_AVATAR_3D` stub render nothing until R7; tech-debt #421). `binding.ts` — `ConversationContextBinding` `{ kind: 'video'|'studio_session'|'persona'|'none'; videoId?; personaId?; entityId?; adventureSessionId?; partyPersonaIds? }` + the `ConversationContextKind` constant + a single `toHelloArgs(binding)` mapper that maps **1:1 onto `buildHelloPayload`** so there is exactly one hello-builder (DRY). **0.48.0 (dashboard B1):** the `PERSONA` kind + the `personaId` field make a standalone persona-face chat a DISTINCT binding so the floater's switch-persona path rebinds (`conversationBindingKey` keys on `personaId`) instead of colliding on a shared `NONE` key; `personaId` is also a `buildHelloPayload` arg (same falsy-drop land-dark contract as the other id fields), and the controller still overlays the active participant's `personaId` on top. `effectiveModel.ts` — `resolveEffectiveModel({ boundModelId, capabilities, needed, override, registry })` is the **single, pure** capability auto-switch (no I/O; R3's vision picker CONSUMES it — there is no parallel `resolveVisionCapability`): returns `{ modelId; reason: 'bound'|'override'|'auto_switch'; switchedFrom?; needed }`. Capability facts come ONLY from the injected R1 chat registry (`listWithCapability`/`satisfies`, typed as a narrow `Pick<>` so the helper depends on just those two methods) — R2 never hardcodes which models are vision-capable, and **fails SOFT to `bound`** when no model advertises the needed capability (a config state the panel surfaces, not a crash). `controller.ts` — `ConversationController`, a **thin state+reducer over the existing `ChatWebSocket`** (it does NOT reimplement transport/reconnect/protocol): holds participants/activeParticipant/`contextBinding`/`modelOverride?` + a reference to the R1 chat registry; `connect()`/`send(text)`/`setModelOverride`/`clearModelOverride`/`addParticipant`/`removeParticipant`/`setActiveParticipant`/`dispose()`; emits a typed `onState(snapshot)` callback (no framework events); the sole `buildHello()` builds the hello once via `buildHelloPayload(toHelloArgs(binding))`; re-derives advisory `partyPersonaIds` (matching `chat-ws/adventureMode.ts`) on participant changes. **Socket adoption:** the constructor takes an optional `existingSocket?: ChatWebSocket` — when supplied it ADOPTS that socket (opens none) and `dispose()` does **NOT** close it (the owner does) — the Watch shared-socket invariant (R2.4) so the dispatcher reads one `FrameBuffer`. **ADDITIVE-ONLY:** `Citation`/`PlaybackState`/`ChatModelCapability` are IMPORTED from `websocket.ts`/`api.ts`, never re-declared (avoids the ambiguous-export trap). **R2.3 (0.30.0):** the controller's hello is **`mode:'text'`, always** (it previously inherited `buildHelloPayload`'s `tts_stt` default, which would have routed the first self-driving `connect()` into the backend voice pipeline — the controller owns TEXT conversations; the voice hello stays page-owned per the R2.2 finding), `onMessage(handler): () => void` is the additive reply-event seam (a passthrough to `ChatWebSocket.onMessage`/`offMessage`) so a renderer can consume `token`/`citation`/`done`/`error`/`turn_changed` frames without reaching into a privately-owned socket, and `send(text, opts?)` gains additive `opts.messages` (`ConversationSendOptions`/`ConversationHistoryMessage`) — the transcript-owning renderer passes prior turns per send because the backend builds `conversation_history` solely from each send's `messages` field (omitted/empty ⇒ wire unchanged). **R7.1 (0.35.0 — portable conversation runtime):** the multi-persona runtime joins the subsystem. `router.ts` — advisory routing helpers lifted verbatim from `web/app/chat-ws/adventureMode.ts` (`MultiPersonaFrameFields`, `turnChangedSpeakerId`, `resolvePersonaPill`+`PillPersona`, `advisoryPartyPersonaIds`); **ADVISORY ONLY** — the server `agents/orchestrator/persona_router.py` `resolve_addressed_persona` is authoritative, the client never routes a turn, it only renders the server's `turn_changed`. `roster.ts` — `ADVENTURE_MUTATION_TOOLS` (the SINGLE copy of the four DM mutation tool names, mirroring `shared/tool_schemas.py`), `isAdventureMutationTool`, `shouldRefreshAdventureRail` (the one land-dark gate on adventure-state refresh), `filterPartyCandidates`+`PartyCandidatePersona`. `runtime.ts` — `ConversationRuntime` (`src/conversation/runtime.ts:33`): a pure reducer/observer over the existing `ChatWsEvent` union — `applyFrame(event)` / `getState(): ConversationRuntimeState` / `subscribe(listener)` (fault-isolated, returns unsubscribe) / `acknowledgeAdventureState()` / `releaseTurn(personaId)` (R7.2, additive: the host removed the persona holding the turn — `activePersonaId` returns to null; the only host-driven speaker transition, `turn_changed` remains the only way the speaker MOVES to a persona). The speaker ONLY moves on a server `turn_changed` while an adventure is active; `done` finalizes the per-message persona pill; a DM-mutation `tool_result` sets `staleAdventureState` for the host to re-fetch+ack. Immutable state-per-transition, listeners fire only on actual change. `types.ts` — `RosterParticipant`/`ConversationRuntimeState`/`ConversationRuntimeOptions` (REUSES the R2.1 `PresenceKind` constants — never re-declared, per the ambiguous-export trap). **PlayCanvas portability:** the runtime has zero React/DOM imports and runs in plain node — a 3D host feeds it the same frames and renders `ConversationRuntimeState` directly; the renderer seam (`PresenceAdapter`) lands in R7.3. Caveat for any engine host: client routing stays advisory — never promote the router helpers to a turn decision. **R7.3 (0.36.0 — `PresenceAdapter` seam, the portability contract):** `presence.ts` — `PresenceAdapter`, the renderer-agnostic interface the runtime drives: `mount(participant)`/`unmount(personaId)`/`setActiveParticipant(personaId|null)`/`setSpeaking(personaId, speaking)`/`applyViseme(personaId, viseme: VisemeSymbol)` — every method keyed by `personaId` (N participants → N presence slots, renderer-independent); `applyViseme` takes the *scheduled viseme value* from the existing `visemeScheduler` pipeline, NEVER a DOM node (the React adapter applies it to SVG, a PlayCanvas adapter to morph targets); `presenceKindHasStage(kind)` is the single text-only gate (a `PRESENCE_NONE` seat receives nothing beyond `mount`/`unmount`). Adapter *selection* stays on the R2.1 `PresenceRendererRegistry` — no parallel kind→factory map. `presenceBus.ts` — `bindPresence(runtime, adapter): PresenceBinding`, pure glue (no renderer dependency): bind mounts the roster + stages the initial speaker; a speaker swap emits `setActiveParticipant(next)` + `setSpeaking(prev,false)` + `setSpeaking(next,true)`; an unstaged/unknown speaker clears the stage to `null`; `PresenceBinding.applyViseme` is the SINGLE viseme delivery path (R7.5's voice module consumes it — never instantiate a second path); `dispose()` is idempotent. **Headless conformance harness:** `src/__tests__/conversation/headlessRenderer.ts` (`RecordingPresenceAdapter`) + `presenceBus.test.ts` pin the exact call sequence a real renderer receives for a 3-participant cue chain, in plain node — the executable proof of PlayCanvas-portability; an engine implements `PresenceAdapter` against that sequence with zero client-core changes. **R7.4 (0.37.0 — Studio cast roster projection):** `rosterProjection.ts` — `castToRoster({ cast, dmPersona, partyPersonaIds })` (`src/conversation/rosterProjection.ts:55`): the single DRY projection turning R5's one-call cast-with-persona response (`getCast` → `CastEntry[]`) + the active `AdventureState` into `RosterParticipant[]` (DM seat first, then party members in party order; de-duplicated, DM never doubled; every server-party member gets a seat even when absent from the cast so a `turn_changed` speaker can always be staged). This is the one place the renderer-facing roster is built — it replaces the pre-R7.4 client-side `entity_id ∈ storyCharacterEntityIds` join across two stores. Pure (no I/O/DOM/React). **R7.5 (0.38.0 — overlay voice parity):** `voice.ts` — `VoiceSession` (`src/conversation/voice.ts`): the framework-agnostic voice pipeline driving a full STT/TTS/mic/viseme round-trip over the SAME `ChatWebSocket` the controller owns/adopts. A THIN composition (not a re-implementation): it composes the existing `AudioPipeline` (player + `VisemeScheduler` + `AudioSessionClient` barge-in + sentence anchoring) + `MicrophoneRecorder`, and builds the voice (`tts_stt`) hello through the SINGLE `buildHelloPayload` — **no second viseme scheduler, no second hello-construction site**. `buildHello()` is fixture-diffed against the page's `startVoiceChat()` payload (the parity oracle, `voice.test.ts`); `start()` mirrors the page's iOS user-gesture priming order EXACTLY (player + `recorder.prime()` in the synchronous prefix — callers MUST invoke it from a click handler's sync prefix); `interrupt()` = barge-in; `dispose()` NEVER closes the socket (the Watch shared-socket invariant). Visemes flow through one `onViseme` callback the renderer routes onto R7.3's `PresenceAdapter.applyViseme` (the single delivery path). `ConversationController` gains additive `voiceSocket()` (hands the shared socket to a `VoiceSession`) + `voiceHelloArgs()` (the single hello-args input: context + active persona/model). The text-only overlay default is unchanged (`mode:'text'`; voice is per-conversation opt-in); `/chat-ws` stays the page-owned parity oracle (its collapse onto `VoiceSession` is tech-debt #470). |
|
|
28
|
-
|
|
29
|
-
## Layout
|
|
17
|
+
Two peer dependencies are **optional** — install them only if you use the feature that loads them.
|
|
18
|
+
Both are dynamically imported at the point of use, so a consumer that skips them never resolves
|
|
19
|
+
them.
|
|
30
20
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
visemeScheduler.ts
|
|
36
|
-
visemeGeometry.ts
|
|
37
|
-
timeFormat.ts ← 0.10.0: formatTimestamp + formatCitationTimestamp
|
|
38
|
-
graphSchema.ts ← 0.12.0: graph whitelists + 2 provenance unions; 0.13.0: session-cached fetchGraphSchema(); 0.15.0: Scene/PlotBeat/CharacterArc + userCreatableLabels/userCreatableEdges/allowedPairs (M7 P3a); 0.39.0: STUDIO_NODE_LABELS/STUDIO_EDGE_TYPES/STUDIO_NODE_PROPERTIES/STUDIO_CHARACTER_TYPE read-surface vocab (R8.1)
|
|
39
|
-
storyGraph.ts ← 0.39.0: deriveScenes/deriveCast + SceneView/CharacterView/ArcView (lifted from web studio; the single story projection Studio + Director share) (R8.1)
|
|
40
|
-
toolSchemas.ts ← 0.11.0: AGENT_TOOL_SCHEMAS (mirror of shared/tool_schemas.py)
|
|
41
|
-
websocket.ts
|
|
42
|
-
api.ts
|
|
43
|
-
vision/ ← Phase 2 vision publisher
|
|
44
|
-
VisionPublisher.ts ← RTCPeerConnection lifecycle + SDP/ICE
|
|
45
|
-
visionScheduler.ts ← fps back-pressure (pure helper)
|
|
46
|
-
types.ts ← VisionPublisherConfig, VisionStatus, …
|
|
47
|
-
credentials.ts ← 0.10.0: toVisionRtcCredentials()
|
|
48
|
-
startVisionPublisher.ts ← 0.10.0: startVisionPublisher() + types
|
|
49
|
-
sourceKinds.ts ← 0.31.0 (R3a): VISION_SOURCE_KINDS + descriptors
|
|
50
|
-
VisionSourceController.ts ← 0.31.0 (R3a): source acquisition + lifecycle
|
|
51
|
-
index.ts ← submodule re-exports
|
|
52
|
-
__tests__/
|
|
53
|
-
VisionPublisher.test.ts
|
|
54
|
-
visionScheduler.test.ts
|
|
55
|
-
reactor/
|
|
56
|
-
types.ts
|
|
57
|
-
regenTemplate.ts
|
|
58
|
-
upsamplePrompt.ts
|
|
59
|
-
entityContext.ts
|
|
60
|
-
scenesFromEnrichment.ts ← Phase 2 timeline mapper (raw Pegasus enrichment → beats; the labelled fallback)
|
|
61
|
-
chunkDistribution.ts ← R8.1: shared computeChunkIndices/enforceSpacing (BOTH mappers; internal, not barrel-exported)
|
|
62
|
-
storyTimeline.ts ← R8.1: deriveStoryTimeline (collapsed R5 story projection → beats; sibling of scenesFromEnrichment)
|
|
63
|
-
heliosTools.ts ← Phase 3 marker grammar
|
|
64
|
-
toolPromptAddon.ts ← Phase 3 system-prompt addon
|
|
65
|
-
toolPromptAddonId.ts ← Phase 3 addon ID constant
|
|
66
|
-
entitySearch.ts ← Phase 3 SWAP_SEED lookup (cached)
|
|
67
|
-
heliosCommandDispatcher.ts ← Phase 3 HeliosCommand executor (abort-aware)
|
|
68
|
-
longLiveCommandDispatcher.ts ← LongLive-v2: dispatchLongLiveCommand (set_shot/scene_cut/schedule_*/set_seed; SAME Reactor bridge, text-only, abort-aware)
|
|
69
|
-
seedImageOrchestrator.ts ← Phase 3+ load → upload → set_image
|
|
70
|
-
sceneEntry.ts ← Step-Into-Scene orchestrator (extract + upsample + bootstrap)
|
|
71
|
-
applyScenePrompt.ts ← Shared upsample + chunk-0-vs-running submit policy
|
|
72
|
-
index.ts ← submodule re-exports
|
|
73
|
-
adapters/ ← R1a: framework-agnostic model-adapter registry (no React/DOM/SDK)
|
|
74
|
-
capabilities.ts ← Capability union = ChatModelCapability (api.ts) + image/world/director caps
|
|
75
|
-
registry.ts ← AdapterRegistry + ModelAdapterDescriptor/NamedRoute + ROUTE_* constants
|
|
76
|
-
chatAdapter.ts ← R1b: loadChatAdapterRegistry — FACADE over /chat/models (selection stays server-side)
|
|
77
|
-
imageAdapter.ts ← R1c: loadImageAdapterRegistry — FACADE over /images/models (catalogue; R1 owns registry, R6 consumes)
|
|
78
|
-
worldAdapter.ts ← R1d + LongLive: helios/longLiveWorldAdapter + createWorldRegistry (both; world default stays helios) + dispatchWorldCommand (per-adapter overloads → dispatchHelios/LongLiveCommand; SDK-free)
|
|
79
|
-
directorAdapter.ts ← R1d + LongLive: helios/longLiveDirectorAdapter + createDirectorRegistry (both; DIRECTOR default FLIPPED to longlive-director, fallback helios-director)
|
|
80
|
-
index.ts ← submodule re-exports
|
|
81
|
-
index.ts ← top-level re-exports
|
|
82
|
-
__tests__/
|
|
83
|
-
api-pollers.test.ts
|
|
84
|
-
audio.test.ts
|
|
85
|
-
loadBundleManifest.test.ts
|
|
86
|
-
visemeGeometry.test.ts
|
|
87
|
-
visemeScheduler.test.ts
|
|
88
|
-
adapters-capabilities.test.ts ← R1a: Capability ↔ imported ChatModelCapability assignability
|
|
89
|
-
adapters-registry.test.ts ← R1a: register/get/list/listWithCapability/resolveRoute/satisfies
|
|
90
|
-
adapters-chat.test.ts ← R1b: loadChatAdapterRegistry facade (verbatim caps, default tiebreak, empty-safe)
|
|
91
|
-
adapters-image.test.ts ← R1c: loadImageAdapterRegistry facade (verbatim caps, isDefault route seed, identity_preserve filter, empty-safe)
|
|
92
|
-
adapters-world.test.ts ← R1d + LongLive: createWorldRegistry seeds, supportedCommands↔HeliosCommand parity, asymmetric matrix via satisfies, dispatchWorldCommand helios delegation + longlive routing + unsupported-adapter throw
|
|
93
|
-
adapters-director.test.ts ← R1d + LongLive: createDirectorRegistry seeds, inherited world caps via worldAdapterId, DIRECTOR default flip (longlive-director) + fallback helios-director
|
|
94
|
-
longLiveCommandDispatcher.test.ts ← LongLive: each LongLiveCommand → correct sendCommand call(s) (set_shot+start guard, snake_case at_session_chunk, abort no-op)
|
|
95
|
-
reactor/
|
|
96
|
-
api-reactor.test.ts
|
|
97
|
-
entityContext.test.ts
|
|
98
|
-
regenTemplate.test.ts
|
|
99
|
-
upsamplePrompt.test.ts
|
|
100
|
-
scenesFromEnrichment.test.ts
|
|
101
|
-
heliosTools.test.ts
|
|
102
|
-
toolPromptAddon.test.ts
|
|
103
|
-
entitySearch.test.ts
|
|
104
|
-
heliosCommandDispatcher.test.ts
|
|
105
|
-
seedImageOrchestrator.test.ts
|
|
106
|
-
```
|
|
21
|
+
| Optional peer | Version | Needed when |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `amazon-kinesis-video-streams-webrtc` | `^2.1.0` | `VisionPublisher` runs in Amazon KVS signalling mode (the backend's vision-RTC credentials endpoint returns `mode: 'kvs'`). Local signalling mode never loads it. |
|
|
24
|
+
| `libopus-wasm` | `^0.2.0` | A `VoiceSession` opts into `offerOpus`. PCM16-only consumers never load it. |
|
|
107
25
|
|
|
108
|
-
|
|
26
|
+
### Module format
|
|
109
27
|
|
|
110
|
-
|
|
28
|
+
ESM only. The published package exposes a single entry point with `types` and `import`
|
|
29
|
+
conditions — there is no CommonJS `require` path. Type declarations ship with the package,
|
|
30
|
+
alongside the TypeScript sources.
|
|
111
31
|
|
|
112
|
-
|
|
32
|
+
## Quick start
|
|
113
33
|
|
|
114
|
-
|
|
34
|
+
```ts
|
|
35
|
+
import { ApiClient, formatCitationTimestamp } from '@escapeaihq/client-core';
|
|
115
36
|
|
|
116
|
-
|
|
37
|
+
const api = new ApiClient(
|
|
38
|
+
'https://api.example.com', // tools / ingestion base URL
|
|
39
|
+
sessionToken, // bearer token, or `undefined` before login
|
|
40
|
+
'https://chat.example.com', // chat base URL
|
|
41
|
+
);
|
|
117
42
|
|
|
118
|
-
|
|
43
|
+
// Public endpoint — works before login.
|
|
44
|
+
const { models } = await api.listChatModels();
|
|
119
45
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
cd ~/projects/web-app && npm link @escapeaihq/client-core
|
|
46
|
+
api.setSessionToken(freshToken); // swap the bearer at any time
|
|
47
|
+
|
|
48
|
+
formatCitationTimestamp(83.45); // "1:23.45"
|
|
124
49
|
```
|
|
125
50
|
|
|
126
|
-
|
|
51
|
+
Base URLs and tokens are always passed in. The package reads no environment variables and holds
|
|
52
|
+
no application config.
|
|
127
53
|
|
|
128
|
-
##
|
|
54
|
+
## Module map
|
|
129
55
|
|
|
130
|
-
|
|
56
|
+
| Area | What it gives you |
|
|
57
|
+
|---|---|
|
|
58
|
+
| REST | `ApiClient` (the whole backend surface behind one facade) plus every request/response type |
|
|
59
|
+
| Admin & identity | `AdminClient`, `MonitoringClient`, `IdentityClient` |
|
|
60
|
+
| Realtime chat | `ChatWebSocket`, the `ChatWsEvent` frame union, typed event subscriptions |
|
|
61
|
+
| Audio & voice | `AudioPipeline`, `MicrophoneRecorder`, `AudioFramePlayer`, `PlaybackTracker`, `AudioSessionClient`, `VoiceSession`, the binary frame codec, optional Opus transport |
|
|
62
|
+
| Lip-sync | `VisemeScheduler` (phoneme timing → mouth shapes) plus pure mouth-geometry path math |
|
|
63
|
+
| Vision | `VisionPublisher`, `VisionSourceController`, `startVisionPublisher`, fps back-pressure scheduling |
|
|
64
|
+
| Conversation runtime | `ConversationController`, `ConversationRuntime`, `PresenceAdapter` + `bindPresence`, roster projections, `ChatSessionStore` |
|
|
65
|
+
| Model adapters | `AdapterRegistry`, `createPlatformRegistries`, per-domain registries and the experience-model catalog |
|
|
66
|
+
| Story graph | The graph-schema vocabulary, `deriveScenes` / `deriveCast`, arc and timeline projections |
|
|
67
|
+
| Creator surfaces | Dashboard, universe, curation and cast projections; visibility filters |
|
|
68
|
+
| Storyboards | Wire types + `StoryboardsApi`, the mask/camera core, the timeline projection |
|
|
69
|
+
| Prompt building | Reactor/Helios prompt builders, world-model orchestrators, prompt compaction |
|
|
70
|
+
| Presentation | Design tokens (`LIGHT_TOKENS` / `DARK_TOKENS`), `parseSeerMessage`, `formatTimestamp` |
|
|
71
|
+
|
|
72
|
+
Everything below is exported from the package root.
|
|
73
|
+
|
|
74
|
+
## REST — `ApiClient`
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
new ApiClient(baseURL: string, sessionToken: string | undefined, chatBaseUrl: string)
|
|
78
|
+
```
|
|
131
79
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
80
|
+
Two base URLs because the backend runs two apps: the tools/ingestion API and the chat API (which
|
|
81
|
+
also hosts images, videos, orgs, admin and identity routes). `ApiClient` picks the right one per
|
|
82
|
+
method — you never choose.
|
|
83
|
+
|
|
84
|
+
`setSessionToken(token)` swaps the bearer in place. `setOboAssertion(assertion)` attaches a
|
|
85
|
+
server-minted on-behalf-of assertion, carried as the `X-Seer-OBO-Assertion` header on every JSON
|
|
86
|
+
request; the assertion is opaque here (minting and verification stay server-side) and is **sticky**
|
|
87
|
+
on the instance until cleared, so a server that mints per request must use a per-request client or
|
|
88
|
+
clear it after each call.
|
|
89
|
+
|
|
90
|
+
The surface is broad — videos and ingestion jobs, enrichment, transcripts and dialog search, the
|
|
91
|
+
graph editor, personas and voices, projects and orgs, adventures and quests, arcs, enhancements,
|
|
92
|
+
workflows, images and video generation, storyboards, artifacts, universes. Every method is typed
|
|
93
|
+
and every response type is exported; browse the shipped declarations for the full list.
|
|
94
|
+
|
|
95
|
+
Common patterns worth knowing:
|
|
96
|
+
|
|
97
|
+
- Poll helpers wrap the 202-and-poll endpoints: `pollVisemeBundleUntilDone`,
|
|
98
|
+
`pollRegenerationUntilDone`, `pollWorkflowStepUntilDone`. They take `{ intervalMs?, timeoutMs?,
|
|
99
|
+
signal? }`, resolve on a terminal status and throw on failure.
|
|
100
|
+
- Terminal-status sets are exported rather than re-spelled at call sites —
|
|
101
|
+
`REGENERATION_TERMINAL_STATUSES`, `WORKFLOW_TERMINAL_RUN_STATUSES`,
|
|
102
|
+
`ARC_PROPOSAL_TERMINAL_STATUSES` (+ `isArcProposalTerminal`), `RESTORE_TERMINAL_STATUSES`
|
|
103
|
+
(+ `isTerminalRestoreStatus`), `BRANCH_TERMINAL_STATUSES` (+ `isTerminalBranchStatus`),
|
|
104
|
+
`TERMINAL_VIDEO_GEN_STATUSES` (+ `isTerminalVideoGenStatus`), `SERIES_TRANSFER_TERMINAL_STATUSES`.
|
|
105
|
+
Hand-rolled status lists silently miss members such as `'cancelled'` and poll forever.
|
|
106
|
+
- Uploads (`uploadVideo`, `uploadDocument`) use multipart XHR and accept an `onProgress` callback.
|
|
107
|
+
- Binary responses (`auditionPersona`, `getSeedImageBlob`) resolve to a `Blob`.
|
|
108
|
+
|
|
109
|
+
`AdminClient` and `MonitoringClient` are separate, read-mostly clients over the admin routes; both
|
|
110
|
+
take `(chatBaseUrl, sessionToken?)`. `IdentityClient` (same signature) is session-gated rather than
|
|
111
|
+
admin-gated and covers self-service account linking.
|
|
112
|
+
|
|
113
|
+
## Realtime chat — `ChatWebSocket`
|
|
114
|
+
|
|
115
|
+
An auto-reconnecting wrapper around the native WebSocket with text/binary multiplexing.
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
import { ChatWebSocket } from '@escapeaihq/client-core';
|
|
119
|
+
|
|
120
|
+
const ws = new ChatWebSocket({
|
|
121
|
+
url: 'wss://chat.example.com/api/chat/ws',
|
|
122
|
+
// Prefer fetchToken over a static authToken for short-lived tokens: it is
|
|
123
|
+
// invoked once per connect attempt, including every reconnect.
|
|
124
|
+
fetchToken: () => api.getChatWsToken().then((r) => r.wsToken),
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
await ws.connect();
|
|
128
|
+
ws.onMessage((frame) => { /* frame: WebSocketMessage */ });
|
|
129
|
+
ws.send('who is in this scene?', { videoId });
|
|
130
|
+
ws.disconnect();
|
|
131
|
+
```
|
|
137
132
|
|
|
138
|
-
|
|
133
|
+
Inbound frames come in two typings. `ChatWsEvent` is the discriminated union — tokens, citations,
|
|
134
|
+
images, audio chunks, tool results, turn changes, quest-state changes, roster changes, DM
|
|
135
|
+
directives, asides, errors — and is what new code should switch on, because TypeScript narrows each
|
|
136
|
+
case to exactly the fields it carries. `onMessage` handlers are still typed against the legacy flat
|
|
137
|
+
`WebSocketMessage` interface for back-compat; narrow to `ChatWsEvent` in the handler body. Either
|
|
138
|
+
way, a consumer that ignores unknown `type` values degrades safely: new frame kinds are added as new
|
|
139
|
+
members, never by widening an existing one.
|
|
140
|
+
|
|
141
|
+
Some frames also dispatch as typed events via `ws.on(name, handler)` / `ws.off(...)`: the vision
|
|
142
|
+
signalling events, `session_attached` and `presence`.
|
|
143
|
+
|
|
144
|
+
Fire-and-forget publishers (they drop silently when the socket isn't open):
|
|
145
|
+
`sendPlaybackState` for cross-device video↔chat sync, `sendVisionOffer` / `sendVisionIce` /
|
|
146
|
+
`sendVisionClose` / `sendVisionAttach` / `sendVisionDetach` for vision signalling, and
|
|
147
|
+
`sendSessionAttach` / `sendSessionDetach` for server-anchored sessions.
|
|
148
|
+
|
|
149
|
+
Vision refusals arrive in two wire shapes from the same backend handler. `classifyVisionError(raw)`
|
|
150
|
+
normalizes both into one `VisionErrorEvent` (or `null`) with a `VisionErrorReason` of `'rejected'`,
|
|
151
|
+
`'throttled'` or `'failed'`;
|
|
152
|
+
`isVisionScopedChatError(frame)` and `VISION_SCOPED_ERROR_ACTIONS` let a chat surface skip a vision
|
|
153
|
+
refusal rather than render it as a failed turn.
|
|
154
|
+
|
|
155
|
+
## Audio, voice and lip-sync
|
|
156
|
+
|
|
157
|
+
The binary frame codec is the wire format — a 1-byte tag plus 320 PCM16 samples — with the message
|
|
158
|
+
types for phoneme, word and barge-in metadata, plus the `audio_unavailable` and `voice_fallback`
|
|
159
|
+
frames (a sentence that produced no audio, and a persona speaking in the session voice) and their
|
|
160
|
+
label maps.
|
|
161
|
+
|
|
162
|
+
Audio I/O is built from `MicrophoneRecorder`, `AudioFramePlayer`, `PlaybackTracker`,
|
|
163
|
+
`AudioSessionClient`, and `AudioPipeline` composing them. Barge-in is clean (gain node plus tracked
|
|
164
|
+
active sources), mic and player share one refcounted page-singleton `AudioContext`, the player runs
|
|
165
|
+
an adaptive jitter buffer and an `AudioBuffer` pool, and `setDuck(gain)` / `clearDuck()` lower the
|
|
166
|
+
master gain while another surface is speaking.
|
|
167
|
+
|
|
168
|
+
`VisemeScheduler` maps TTS phoneme timing to mouth-shape changes on `requestAnimationFrame`, locked
|
|
169
|
+
to `AudioContext.currentTime`, and stops the loop when idle. The mouth-geometry helpers are pure path math — inner-lip donut,
|
|
170
|
+
mouth clip ellipse, teeth and tongue geometry.
|
|
171
|
+
|
|
172
|
+
Optional Opus legs ride the same framing. `createOpusTransportCodecs()`
|
|
173
|
+
dynamically imports `libopus-wasm` at a pinned 16 kHz mono VoIP profile; the mic leg encodes to
|
|
174
|
+
`TAG_MIC_OPUS` and the TTS leg decodes `TAG_AI_OPUS` back to legacy PCM16 frames, so the rest of the
|
|
175
|
+
pipeline stays codec-agnostic. `VoiceSession` owns the lifecycle: with `offerOpus` it preloads
|
|
176
|
+
before the hello, offers `['opus', 'pcm16']` only on success and switches both legs when the server
|
|
177
|
+
acknowledges Opus. The default hello is byte-identical PCM16, and a corrupt packet drops the packet,
|
|
178
|
+
never the session.
|
|
179
|
+
|
|
180
|
+
## Vision publishing
|
|
181
|
+
|
|
182
|
+
`VisionPublisher` takes any `MediaStreamTrack` plus a `ChatWebSocket` and manages the
|
|
183
|
+
`RTCPeerConnection` lifecycle — SDP offer/answer, ICE trickle, restart on disconnect. Signalling is
|
|
184
|
+
dual-mode: Amazon KVS when the backend mints KVS credentials (this is the path that needs the
|
|
185
|
+
optional peer dependency), otherwise the chat-WebSocket protocol. `setFps(target)` retargets the
|
|
186
|
+
sender's `maxFramerate` at runtime, and the initial cap is baked into the first negotiation.
|
|
187
|
+
|
|
188
|
+
`VisionSourceController` owns "turn a chosen local source into a published feed": acquire (camera
|
|
189
|
+
via `getUserMedia`, or a `<video>` element's captured stream with a first-frame gate), mint
|
|
190
|
+
credentials, delegate to `startVisionPublisher`. `switchSource()` tears the previous publisher down
|
|
191
|
+
before acquiring the next; `stop()` is idempotent and leaves zero live tracks. It also honours the
|
|
192
|
+
server's retry budget — inside a throttle window `start()` refuses locally without touching the
|
|
193
|
+
camera and reports the remaining seconds.
|
|
194
|
+
|
|
195
|
+
`createVisionScheduler` is the pure fps back-pressure helper: it halves the publish rate under the
|
|
196
|
+
server's pause signal and eases back up as the buffer drains, clamped to `[minFps, fps]` with
|
|
197
|
+
`VISION_MIN_FPS` = `0.5` as the floor default.
|
|
198
|
+
|
|
199
|
+
Refusals surface as `VisionRefusedError` (`reason`, `retryAfterSeconds`, `traceId`, `recoverable`),
|
|
200
|
+
with `formatVisionErrorMessage` as the single wording.
|
|
201
|
+
|
|
202
|
+
## Headless conversation runtime
|
|
203
|
+
|
|
204
|
+
Zero DOM. The same controller drives a React panel and a game engine.
|
|
205
|
+
|
|
206
|
+
`ConversationController` is a thin state and reducer layer over `ChatWebSocket` — participants,
|
|
207
|
+
active participant, context binding, model override. It can **adopt** an existing socket
|
|
208
|
+
(`existingSocket`), in which case `dispose()` does not close it. `resolveEffectiveModel` is the one
|
|
209
|
+
pure capability auto-switch: it consults an injected chat registry and fails soft to the bound model
|
|
210
|
+
when nothing advertises the needed capability.
|
|
211
|
+
|
|
212
|
+
`ConversationRuntime` is a pure reducer over the `ChatWsEvent` union: `applyFrame(event)`,
|
|
213
|
+
`getState()`, `subscribe(listener)`. The speaker only moves on a server `turn_changed`; the client
|
|
214
|
+
never routes a turn itself. `adventureStateEpoch` is a monotonic counter of gated DM mutations and
|
|
215
|
+
`acknowledgeAdventureState(epoch)` acknowledges by value, so a second mutation arriving mid-refetch
|
|
216
|
+
is not lost.
|
|
217
|
+
|
|
218
|
+
`PresenceAdapter` is the renderer-agnostic seam — `mount`, `unmount`, `setActiveParticipant`,
|
|
219
|
+
`setSpeaking`, `applyViseme`, all keyed by persona id. `bindPresence(runtime, adapter)` is the pure
|
|
220
|
+
glue, and `PresenceRendererRegistry` maps a presence kind to a renderer factory (fail-loud on a
|
|
221
|
+
duplicate registration, no-op for an unregistered kind).
|
|
222
|
+
|
|
223
|
+
`VoiceSession` is a full STT/TTS/mic/viseme round trip over the same socket, composed from
|
|
224
|
+
`AudioPipeline` and `MicrophoneRecorder` rather than reimplemented. `start()` must be called from
|
|
225
|
+
the synchronous prefix of a click handler (iOS gesture priming). `synthesizeReply(text)` arms the
|
|
226
|
+
output half without the mic so a typed turn is still spoken. `handleReconnect()` re-primes after a
|
|
227
|
+
socket reconnect; `dispose()` never closes the socket.
|
|
228
|
+
|
|
229
|
+
`ChatSessionStore` wraps session CRUD with the orchestration a chat surface needs, and
|
|
230
|
+
`ConversationTranscriptCache` is a generic, storage-injectable transcript cache (omit the storage
|
|
231
|
+
and it is an SSR no-op).
|
|
232
|
+
|
|
233
|
+
## Model adapter registries
|
|
234
|
+
|
|
235
|
+
`AdapterRegistry` is the primitive: `register()` (additive, throws on a duplicate id), `get`,
|
|
236
|
+
`list`, `listWithCapability(cap)`, `resolveRoute(name)` — which degrades to the fallback route
|
|
237
|
+
rather than throwing — and `satisfies(id, required)`. Route names are the exported `ROUTE_DEFAULT`,
|
|
238
|
+
`ROUTE_FALLBACK` and `ROUTE_HIGH_QUALITY` constants.
|
|
239
|
+
|
|
240
|
+
`createPlatformRegistries(client)` composes all seven — `chat`, `image`, `world`, `director`,
|
|
241
|
+
`extraction`, `embedding`, `videoGen`. Chat, image and extraction hydrate from their backend
|
|
242
|
+
catalogues; world, director and video-gen are synchronous seeds. The registries **mirror** the
|
|
243
|
+
backend catalogue; model selection stays server-side, so there is no client-side routing table.
|
|
244
|
+
|
|
245
|
+
For world models the descriptor carries four independent axes, each with its own resolver:
|
|
246
|
+
`capabilities` (the abstract gate), `supportedCommands` (advisory metadata),
|
|
247
|
+
`seedImageCommand` — resolved by `resolveWorldSeedImageCommand` — for handing a model an uploaded
|
|
248
|
+
seed image, and `resolveWorldSteerCommand` for re-aiming a world that is already running. An unknown
|
|
249
|
+
id resolves to `null`, which means *do not send*; never fall back to another model's verb.
|
|
250
|
+
`dispatchWorldCommand(adapterId, cmd, ctx)` routes to the right dispatcher with per-adapter
|
|
251
|
+
overloads, and throws `UnsupportedWorldAdapterError` for an unknown id without touching the bridge.
|
|
252
|
+
`worldModelTradeoff(registry, id)` answers what picking a model commits you to — seed timing, world
|
|
253
|
+
lifetime, vendor listing, scene-change cost.
|
|
254
|
+
|
|
255
|
+
`experienceModelCatalog(registry, options?)` is the single projection a model switcher renders,
|
|
256
|
+
combining registry world rows with the off-registry live-edit and video-generation seams. Each row
|
|
257
|
+
carries capability flags and a `wired` selectability gate;
|
|
258
|
+
`isExperienceModelWired(registry, modelId, options?)` is the matching host gate — pass it the
|
|
259
|
+
**same** options you passed the catalog or the two can disagree.
|
|
260
|
+
|
|
261
|
+
## Story graph and creator projections
|
|
262
|
+
|
|
263
|
+
The graph-schema vocabulary mirrors the backend: the `GraphNodeLabel` / `GraphRelationshipType`
|
|
264
|
+
unions with their runtime tuples `GRAPH_NODE_LABELS` / `GRAPH_RELATIONSHIP_TYPES`, plus
|
|
265
|
+
`GRAPH_PRIMARY_KEY`, `GRAPH_EDITABLE_NODE_PROPERTIES`, `GRAPH_EDITABLE_RELATIONSHIP_PROPERTIES`, the
|
|
266
|
+
user-creatable subsets `userCreatableLabels` / `userCreatableEdges` / `allowedPairs`, and the studio
|
|
267
|
+
read-surface vocabulary. Provenance is deliberately **two** unions that are never merged —
|
|
268
|
+
`StoryGraphProvenance` and `MemoryFactProvenance` — each with its own value tuple, authored-canon
|
|
269
|
+
set and type guard. `fetchGraphSchema(client)` fetches the live schema once per session and is the
|
|
270
|
+
runtime source of truth; the static constants are the compile-time vocabulary and fallback.
|
|
271
|
+
|
|
272
|
+
The story-graph module holds the collapsed projection both the studio read views and the director
|
|
273
|
+
timeline consume: `deriveScenes(graph)` and `deriveCast(graph)`, plus the `SceneView` / `CharacterView` /
|
|
274
|
+
`ArcView` / `ShotView` view-model types. Traversal is edge-direction-agnostic.
|
|
275
|
+
|
|
276
|
+
`deriveArcGhostLane(variant, knownSceneIds)` projects an arc proposal onto a scene board
|
|
277
|
+
as a read-only ghost swimlane, with anchors validated against real scenes.
|
|
278
|
+
|
|
279
|
+
Creator-surface projections are pure functions over API responses: `deriveNeedsYou`,
|
|
280
|
+
`deriveProjectConsole`, `filterProjectsByCategory` and friends for a dashboard;
|
|
281
|
+
`confidenceQueue`, `seriesCurationGroups`, `resolveSuggestionEntity` for a curation queue;
|
|
282
|
+
`castWithPersona` for a cast grid; `mergeGraphRelations` for a universe view.
|
|
283
|
+
`isFabricatedDefaultConfidence(v)` and `FABRICATED_DEFAULT_CONFIDENCE` (`0.75`) flag a confidence
|
|
284
|
+
that is the backend's write-time default rather than a measured signal, so a surface can render
|
|
285
|
+
"unverified" instead of a fabricated percentage.
|
|
286
|
+
|
|
287
|
+
Visibility filtering has one predicate family so the halves cannot drift: `isBlessed(row)`,
|
|
288
|
+
`onlyBlessed(rows)` for a showcase catalog, `withoutBlessed(rows)`, and
|
|
289
|
+
`withoutForeignBlessed(rows, ownedVideoIds)` for creator surfaces — build the ownership set with
|
|
290
|
+
`loadOwnedVideoIds(client)` (returns `null` rather than throwing, so a listing blip degrades the
|
|
291
|
+
rule instead of blanking a feed) or `ownedVideoIdSet(listings)`.
|
|
292
|
+
|
|
293
|
+
Other single-source helpers: `extractionStageState(job)` for the extraction stage of an ingestion
|
|
294
|
+
job; `parseReprocessBlockedReason(error)` + `REPROCESS_BLOCKED_REASON` for the stable reprocess
|
|
295
|
+
conflict tokens; `buildRegenerationScope(kind, targetId?)`; `seriesDisplaySlug(seriesId)`
|
|
296
|
+
(render-only — never use the output for equality, grouping or as a key, and never send it back);
|
|
297
|
+
`absentBundleFallbackReason(persona)` + `FACE_FALLBACK_LABELS` for why a renderer is painting the
|
|
298
|
+
generic face.
|
|
299
|
+
|
|
300
|
+
## Storyboards
|
|
301
|
+
|
|
302
|
+
`StoryboardsApi` (also facade-delegated on `ApiClient`) plus the wire types mirror the backend
|
|
303
|
+
storyboard models. Three rules the module enforces and no consumer should re-derive:
|
|
304
|
+
|
|
305
|
+
- **Ordering lives only in `Storyboard.frameIds`.** There is no per-frame order field; a reorder is
|
|
306
|
+
one idempotent list patch, and `orderStoryboardFrames(frameIds, frames)` is the only resolver.
|
|
307
|
+
- **Frame status is derived,** never sent. `deriveFrameStatus(variants)` mirrors the server rule for
|
|
308
|
+
the optimistic window between a write and the next read.
|
|
309
|
+
- **The master frame is `STORYBOARD_MASTER_FRAME_WIDTH` × `STORYBOARD_MASTER_FRAME_HEIGHT`
|
|
310
|
+
(1664 × 936) at `STORYBOARD_MASTER_ASPECT_RATIO` (`'16:9'`).**
|
|
311
|
+
|
|
312
|
+
`txnVer` is store-owned: read it off a frame and echo it back on a patch or the version guard is
|
|
313
|
+
dead — never mint one.
|
|
314
|
+
|
|
315
|
+
Reading a frame splits by purpose. `displayFrameVariant(frame)` is succeeded-only (what to *show*),
|
|
316
|
+
`frameImageUrl(frame)` its presigned URL; `promptFrameVariant(frame)` is the prompt accessor and
|
|
317
|
+
falls back to the newest variant of any status carrying prompt text, so a refused frame stays
|
|
318
|
+
distinguishable from one that does not exist. `frameRenderFailed(frame)` /
|
|
319
|
+
`frameRenderFailure(frame)` tell "refused and never coming back" apart from "still generating".
|
|
320
|
+
`storyboardFrameBudget(variant)` gives `{ nodeCount, frameCount, capped }` — a count-only spend
|
|
321
|
+
preview, capped at `MAX_FRAMES_PER_BOARD` (24).
|
|
322
|
+
|
|
323
|
+
The region-edit core has zero extra dependencies: normalized brush strokes
|
|
324
|
+
(radius normalized against the longer edge, so the brush stays round on a 16:9 frame), a pure
|
|
325
|
+
`planMaskRender` returning an assertable op list, and a structural `rasterizeMaskPlan` that accepts
|
|
326
|
+
anything shaped like a 2D context. **White (`MASK_PAINT_COLOR`) edits, black (`MASK_KEEP_COLOR`)
|
|
327
|
+
keeps.** Only `renderMaskToCanvas` / `strokesToMaskPngBlob` / `strokesToMaskBase64` need a real
|
|
328
|
+
canvas, and they throw in a canvas-less environment rather than silently posting a mask that edits
|
|
329
|
+
the wrong pixels. The camera half is a dual encoding: `CameraPose` ⇄ tuple ⇄ annotation, plus
|
|
330
|
+
`cameraPoseToProse` for the deterministic prose leg.
|
|
331
|
+
|
|
332
|
+
The board's timeline projection is in **seconds only** — the app applies its own
|
|
333
|
+
pixels-per-second. `buildStoryboardTimeline(frameIds, frames)` returns cumulative clips, bands of
|
|
334
|
+
consecutive clips sharing a sequence, a total, and `missingFrameIds` (normal mid-run: the ordering
|
|
335
|
+
is written before the frames exist). `clipAtTime(timeline, seconds)` hit-tests the playhead;
|
|
336
|
+
`storyboardFrameProgress(timeline)` counts by derived status over the whole timeline, and its
|
|
337
|
+
`fraction` is settled/total — a board whose last frame failed is finished.
|
|
338
|
+
|
|
339
|
+
## Prompt building and world entry
|
|
340
|
+
|
|
341
|
+
The Reactor modules hold deterministic prompt builders and world-model orchestrators, all free of
|
|
342
|
+
any vendor SDK import — the consuming app owns the SDK. `buildRegenPrompt(input)` produces image-regen
|
|
343
|
+
prompts with locked aspect ratio and identity guarantees; `buildUpsamplePrompt(input)` returns
|
|
344
|
+
`{ system, user }` blocks for any LLM transport; `aggregateEntityContext` and
|
|
345
|
+
`aggregatePersonaContext` adapt existing records into the canonical context shapes.
|
|
346
|
+
`mapEnrichmentToTimeline` and `deriveStoryTimeline` are the two timeline mappers (raw enrichment,
|
|
347
|
+
and the collapsed story projection) sharing one chunk-distribution algorithm.
|
|
348
|
+
|
|
349
|
+
`parseHeliosCommands(text)` extracts inline `[SET_SCENE: "…"]`-style markers from streamed chat
|
|
350
|
+
output and `stripHeliosCommands(text)` removes them from the displayed transcript.
|
|
351
|
+
`dispatchHeliosCommand` / `dispatchLongLiveCommand` execute a parsed command against a structural
|
|
352
|
+
bridge — pure async functions, abort-aware.
|
|
353
|
+
|
|
354
|
+
`launchHappyOysterWorld` is a create-or-reopen orchestrator over a structural bridge, with the
|
|
355
|
+
prompt cap the vendor SDK does not enforce, a `{ encryptedWorldId, mode }` handle, and a failure
|
|
356
|
+
vocabulary. Seed preparation crops rather than merely compressing, because the vendor rejects an
|
|
357
|
+
out-of-band seed only after a permanent, already-billed world exists.
|
|
358
|
+
|
|
359
|
+
`compactFramePromptText(text, maxChars)` fits a compiled frame prompt inside a target's cap
|
|
360
|
+
**without truncating**: it sheds whole semantic units along the prompt's own boundaries in a fixed
|
|
361
|
+
ceremony-first order and stops the instant the text fits. It never touches the action line, so a
|
|
362
|
+
frame whose action alone exceeds the cap comes back still over it and the caller's cap check blocks
|
|
363
|
+
loudly instead of launching half a beat.
|
|
364
|
+
|
|
365
|
+
## Presentation helpers
|
|
366
|
+
|
|
367
|
+
The shared design-token palette is `LIGHT_TOKENS` and `DARK_TOKENS` (a complete map over every
|
|
368
|
+
token key), `cssVarName(key)` and `toCssVars(map)`. It is a TypeScript map rather than a stylesheet
|
|
369
|
+
so it ships through the tsc-only build (a stylesheet in the source tree would not reach the
|
|
370
|
+
emitted output); each app owns its own CSS emission.
|
|
371
|
+
|
|
372
|
+
`parseSeerMessage(content)` is the one parser for persona/assistant chat output,
|
|
373
|
+
returning a **token stream** (`text`, `bold`, `italic`, `cue`, `imageRef`, `linebreak`) so consumers
|
|
374
|
+
never build raw HTML. It extracts deduped emotion badges, preserves non-verbal cues, and collects
|
|
375
|
+
control tags. `splitSeerInternalBlocks(content)` runs first and is streaming-safe: reasoning blocks
|
|
376
|
+
are captured for an optional disclosure and tool scaffolding is dropped, with a tag split across
|
|
377
|
+
streamed tokens held back rather than flashed. Do not add a per-surface strip.
|
|
378
|
+
|
|
379
|
+
`formatTimestamp(seconds, options?)` is the locale-aware `M:SS` / `M:SS.cs` formatter;
|
|
380
|
+
`formatCitationTimestamp(seconds)` is the centisecond preset used for sub-second citations.
|
|
381
|
+
|
|
382
|
+
The tool-schema mirror exposes the server-side RAG tool surface — `AGENT_TOOL_SCHEMAS` (14 tools),
|
|
383
|
+
`AGENT_TOOL_NAMES`, `getAgentToolSchema(name)` — so a client can introspect each tool's name,
|
|
384
|
+
description, endpoint, method and request fields without copy-pasting strings. It is CI-diffed
|
|
385
|
+
against a generated backend contract.
|
|
386
|
+
|
|
387
|
+
The workflow-authoring catalog and pre-publish lint back a workflow composer:
|
|
388
|
+
`WORKFLOW_DRIVER_AUTHORING` (a total record over the driver union, so catalog completeness is a
|
|
389
|
+
compile-time guarantee), `WORKFLOW_DRIVER_GROUPS`, `workflowDriversByGroup()`,
|
|
390
|
+
`authoredStepFromDriver(driver, stepId)` and `validateAuthoredSteps(steps)` returning
|
|
391
|
+
`{ errors, warnings }`.
|
|
392
|
+
|
|
393
|
+
## Errors
|
|
394
|
+
|
|
395
|
+
Non-2xx JSON responses throw an `Error` whose `message` is the server's shaped detail. Two
|
|
396
|
+
additive runtime properties ride along for callers that need to branch. They are **not** on the
|
|
397
|
+
declared `Error` type, so read them through a narrow-and-cast
|
|
398
|
+
(`(err as Error & { status?: number }).status`):
|
|
399
|
+
|
|
400
|
+
- `.status` — the HTTP status code. Branch on it instead of pattern-matching the message.
|
|
401
|
+
- `.detail` — the structured detail object when the server sent one (a string detail invents
|
|
402
|
+
nothing). Some routes answer with fields you need: a frame-world conflict returns the id of the
|
|
403
|
+
world the frame already owns.
|
|
404
|
+
|
|
405
|
+
Typed error classes, for the cases where a status code isn't enough:
|
|
406
|
+
|
|
407
|
+
| Class | Thrown by |
|
|
408
|
+
|---|---|
|
|
409
|
+
| `RecloneConflictError` | Persona voice re-clone conflict; carries a `RecloneConflictCode` so a UI can distinguish exhausted retries from no remaining candidate clips |
|
|
410
|
+
| `RestoreConflictError` | Universe restore; `code: 'stale_plan' \| 'already_active'` disambiguates two causes behind one status |
|
|
411
|
+
| `RestoreInvalidTargetError` | Universe restore against an invalid target version |
|
|
412
|
+
| `VisionRefusedError` | A backend vision refusal; carries `reason`, `retryAfterSeconds`, `traceId`, `recoverable` |
|
|
413
|
+
| `UnsupportedWorldAdapterError` | `dispatchWorldCommand` with an unregistered adapter id |
|
|
414
|
+
| `HappyOysterLaunchError` | World launch failure; carries `reason` and `retryable`, and **the `handle` when a world was created but never streamed — that world is already billed and this handle is the only way back to it** |
|
|
139
415
|
|
|
140
|
-
##
|
|
416
|
+
## Host integration seams
|
|
141
417
|
|
|
142
|
-
|
|
418
|
+
**Session refresh.** Every client here snapshots its bearer at construction, so a surface a user
|
|
419
|
+
lingers on will 401 on its next call. Install one refresher for the whole page:
|
|
143
420
|
|
|
144
|
-
|
|
421
|
+
```ts
|
|
422
|
+
import { setSessionRefresher, hasSessionRefresher } from '@escapeaihq/client-core';
|
|
145
423
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
npm test # jest (jsdom)
|
|
150
|
-
npm run build # tsc -p tsconfig.build.json && node scripts/add-ext.mjs → dist/
|
|
424
|
+
setSessionRefresher(async (staleToken) => refreshWithYourAuthProvider(staleToken));
|
|
425
|
+
|
|
426
|
+
hasSessionRefresher(); // true — pass `undefined` to setSessionRefresher to clear it
|
|
151
427
|
```
|
|
152
428
|
|
|
153
|
-
|
|
429
|
+
The JSON request path then replays a bearer 401 exactly once, and only when the refresh yields a
|
|
430
|
+
*different* token. Registration is module-level on purpose: one registration covers every client
|
|
431
|
+
instance — including a stale one held in a long-running closure — and concurrent 401s collapse onto
|
|
432
|
+
a single refresh. A host that installs nothing behaves exactly as before. The replay rides the JSON
|
|
433
|
+
path only; raw/blob fetches, SSE streams and multipart uploads are not replayed.
|
|
154
434
|
|
|
155
|
-
|
|
435
|
+
**On-behalf-of.** The OBO helpers carry the assertion header constant (`OBO_ASSERTION_HEADER`),
|
|
436
|
+
federated-id helpers and the `OboAssertionClaims` type. Minting and verification stay server-side —
|
|
437
|
+
the package holds no secrets.
|
|
156
438
|
|
|
157
|
-
|
|
439
|
+
**Tenant and role claims.** The claim readers pull the active-tenant and role claims out of a
|
|
440
|
+
session JWT for **display only** (`getActiveOrgIdFromJwt`, `getDctClaim`, `getJwtClaims`, `getRolesFromJwt`,
|
|
441
|
+
`hasPlatformAdminRole`, `PLATFORM_ADMIN_ROLE_NAME`). It is unverified by design; the backend
|
|
442
|
+
independently verifies membership.
|
|
158
443
|
|
|
159
|
-
|
|
160
|
-
# 1. bump version in packages/client-core/package.json (semver)
|
|
161
|
-
# 2. commit the bump on main
|
|
162
|
-
git commit -am "client-core: release v0.4.2"
|
|
163
|
-
# 3. tag and push — the tag triggers the publish workflow
|
|
164
|
-
git tag client-core-v0.4.2
|
|
165
|
-
git push origin main client-core-v0.4.2
|
|
166
|
-
```
|
|
444
|
+
## Stability and versioning
|
|
167
445
|
|
|
168
|
-
The
|
|
446
|
+
The package is a published, **additive-only** contract with more than one consumer: exported symbols
|
|
447
|
+
are not removed or renamed, and new fields arrive optional. Practical consequences:
|
|
169
448
|
|
|
170
|
-
|
|
449
|
+
- Switch exhaustively on unions you consume, but treat an unknown member as ignorable — new
|
|
450
|
+
frame kinds, new statuses and new capabilities are added, not substituted.
|
|
451
|
+
- Optional fields are optional because a client may deploy ahead of the API. Degrade on absence.
|
|
452
|
+
|
|
453
|
+
While the package is `0.x` it is pre-stable and constructor signatures may still change. Pin an
|
|
454
|
+
exact version (no caret) until `1.0`.
|
|
171
455
|
|
|
172
456
|
| Bump | When |
|
|
173
457
|
|---|---|
|
|
174
|
-
|
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
178
|
-
While this is `0.x`, the package is pre-stable: any release may include breaking changes in the constructor signatures of `ApiClient`, `AudioPipeline`, etc. — consumers should pin to an exact version (`"@escapeaihq/client-core": "0.1.0"`, no caret) until `1.0`.
|
|
458
|
+
| Patch | Bug fix in an existing function; internal helper; docs; tests; non-API-visible refactor |
|
|
459
|
+
| Minor | New exported function, class or type; new optional parameter; new module |
|
|
460
|
+
| Major | Renamed or removed export; a required argument added or reordered; a changed return type or thrown error consumers branch on |
|
|
179
461
|
|
|
180
|
-
##
|
|
462
|
+
## Not in scope
|
|
181
463
|
|
|
182
|
-
- React or Vue components, hooks
|
|
183
|
-
-
|
|
184
|
-
-
|
|
464
|
+
- React or Vue components, hooks or composables — those live with their consumer.
|
|
465
|
+
- Application config (environment variables, base URLs) — pass it in via constructor arguments.
|
|
466
|
+
- DOM rendering beyond what the Web Audio, WebRTC and WebSocket APIs require.
|
|
185
467
|
|
|
186
|
-
##
|
|
468
|
+
## Development
|
|
187
469
|
|
|
188
|
-
|
|
470
|
+
From the package directory:
|
|
189
471
|
|
|
190
472
|
```bash
|
|
191
|
-
npm
|
|
192
|
-
#
|
|
193
|
-
npm run
|
|
473
|
+
npm run typecheck # tsc --noEmit
|
|
474
|
+
npm test # jest (jsdom)
|
|
475
|
+
npm run build # emit dist/
|
|
476
|
+
npm run api-report:check # diff the emitted declaration surface against the committed snapshot
|
|
477
|
+
npm run api-report:update # regenerate that snapshot after an intentional additive change
|
|
194
478
|
```
|
|
479
|
+
|
|
480
|
+
The declaration surface is a committed, CI-diffed artifact. If the check fails: an additive change
|
|
481
|
+
means regenerating and committing the snapshot so reviewers see the delta; a removal or rename is
|
|
482
|
+
forbidden — fix the code instead.
|
|
483
|
+
|
|
484
|
+
## License
|
|
485
|
+
|
|
486
|
+
MIT.
|